project-navigation
Personal tools

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Leviathan

Pages: [1]
1
Newbie Coding / Re: Artificial Intelligence
« on: May 01, 2014, 12:40:08 am »
I will give it some thought.  I am still learning that part of how the AI behaves.

2
Newbie Coding / Re: Artificial Intelligence
« on: April 30, 2014, 12:57:53 am »
H-hour:  That is a consideration to take into account.  However, them taking more reaction fire would be at least partially balanced by them delivering more.  My observation of the AI so far is that the way I move my soldiers I take many more shots at they enemy then they return and one of my key disappointments was the item Duke brought up of an enemy that moves to melee and hides behind him instead of finishing off the soldier.  Personally, I do not mind the aliens having more TUs, not only are they alien beings in game context, but I also assume an AI is going to need such an advantage to make it competitive with a human players brain.  An alternative that would be less of a deviation, both in TU and RF, would be to simply add a check at the very end of action:  Am I standing behind a valid target?  If yes, then melee attack.  This would amount to 6 or 7 bonus TUs and a single extra exposure to RF, balanced by all but eliminating the occurrence of an alien hiding in the shadow of a man with a flame thrower and calmly waiting to be invited to the BBQ. :)

DarkRain:  Thank you, the wiki is helpful in understanding your decision tree algorithm.  After reading it, I believe many of my suggested options for enhancing the AI could be coded by giving each alien a set of "personality weights" that alter leaf weights that already exist.  This would allow for both more variation in alien behavior, and the ability of map editors to place squads of aliens that give the appearance of coordination into their maps.  Alternately, the personality choices could be added as what the wiki refers to as "mission targets", but I think the former would be an easier code change.

Duke:  Another item to consider is a set of guidelines for map designers to help them work with instead of against the AI.  For example, earlier this evening I encountered a map with a crashed Harvester that included a hole torn in the side of the hull as a part of the map layout.  The aliens that would normally get stuck in the Harvester waiting for me to flush them out, this time came spilling out the side of the wreck with some of them leaping down from the top floor to suddenly engage as I approached.  The AI was the same, but the ship layout funneled them together and then out instead of keeping them trapped which gave the illusion of an organized push toward my forces.

3
Newbie Coding / Re: Artificial Intelligence
« on: April 29, 2014, 06:58:50 am »
Perhaps I am oversimplifying, due to a lack of familiarity with the code, but I think the hiding behind soldiers problem could effectively be eliminated by coding for Targets of Opportunity.  By that I mean the "and attack when in range" part of an alien's simple turn. 

For a simple scheme, an alien could attack a soldier when they first come into range, again at some randomized point in movement (some species could get a different # of these, or it could even be modified as part of the individual personality), and again at the end of their movement if a valid target is in LOS.  I would assume this code would be very similar to what already exists for calculating the alien's reaction fire during player movement.

The key, in my opinion, is to hard code for at least one attack at the end of the alien's movement if there is a valid target in LOS and to switch to a melee weapon if range is zero.  Then the effect of the simple AI interpreting a soldier as a place to hide would become, from the players perspective, an alien attempting to charge forward shooting from the hip and then, if successful in closing to melee, gutting them with a kerrblade or sticking them with a plasma blade.  This would make letting the alien get that close a lethal mistake, rather than a comical and exploitable eccentricity in the AI.   

4
Newbie Coding / Re: Artificial Intelligence
« on: April 28, 2014, 05:21:47 am »
Good evening,

This is a great game and I am already greatly enjoying it, however as many others have noted boosting the AI would be a great improvement to the experience.

Some suggestions from my experience so far…

Disclaimer – I have not yet cracked open the C code.  I wanted to give it a top down look without assumptions about what is there.  That may mean some of my suggestions do not mesh well with the existent code body.  In particular, I am assuming an object-oriented programming structure. 

1.   Some of my underlying ideas come from a book that discusses how extremely simple processors (like a hunting spider’s tiny brain) parse environmental data to create the appearance of cunning thought. http://www.amazon.com/Beyond-Brain-Environment-Shape-Animal/dp/0691126445

2.   One could create the illusion of complexity, and even some team effort, if you implemented a “personality object” for each alien.  By that I mean a set of flags and weights that influence the rules governing each alien’s basic decisions so that certain types of alien, and even individual aliens exhibit different hunting patterns.

3.   Using the spider as a model I can envision a simple process for generating an alien’s turn.  Each turn the alien makes three basic choices: destination, path to destination and whether to attack along the way.  If I understand the current code correctly, this is already the general structure.  It could be as simple as; choose a path toward cover that brings you closer to your target and attack when in range.

4.   To add complexity and challenge you could add the concepts of “hunting” and “senses” to the first decision.
a.   Hunting – An alien will choose a destination that brings it closer to a target it is aware of.  A set of flags determine if an alien hunts for specific prey.  Weights determine how aggressively it pursues prey.  Flags can be set to lock on a target, once chosen.
b.   Senses – Aliens can have awareness of targets beyond line of sight, determined by flags.
5.   Examples:
a.   Eager – The alien moves in the direction of the most recent hostile gunshot.  This could also be extended to include a chance to perceive and move toward those lumbering in heavy armor.
b.   Heightened senses – Line of sight is determined only by a distance.  Walls and obstructions do not prevent the alien from perceiving the chosen prey.  Groups of aliens sharing this flag would appear to swarm on a scout who overextends.
c.   Bloodhound – The alien chooses a path to bring it closer to a wounded enemy.  If flagged to lock on a target, this gives the illusion of a “pittbull” mindset that chooses a target and tracks its blood-trail.  Multiple aliens in close proximity with this flag set give the illusion of working together to concentrate fire.  If allowed to track wounded without direct line of sight it gives the illusion of an enemy tracking by scent or blood trail.
d.   Kill Stealer – If there is a wounded soldier available the alien piles on, if not the alien moves closer to another alien.  Multiple of these quickly give the impression of a formation working together to form up and focus fire, particularly if they fall in to file behind an alien hunting by one of the other senses.
e.   Sniper – The alien hunts a target based upon highest (or lowest) rank.  Highest rank appears to be an alien coordinating fire to pick off those in command of the unit.  Lowest rank appears to be singling out rookies to deliberately target the weakest first.  Flagging for this without line of sight would indicate aliens intercepting radio traffic (or even thoughts) to zero in on who does what.
f.   Tactical – Alien prefers to hunt for a particular high stat or equipped weapon.  This would allow for the creation of an alien squad that focuses fire to eliminate long range snipers or heavy weapons specialists as a first priority.
g.   Scalp hunter – The alien hunts the teams best (highest average stats) or most notorious (highest kill count) elite soldier. 
h.   Territorial – The alien does not hunt, but instead chooses a destination such that it patrols in a tight loop and aggressively defends a small area.
i.   Butcher – Prefers to hunt available civilian targets over available soldiers.
j.   Randomized – A random personality for each alien would at least give variety in behavior from battle to battle and alien to alien.  This would approximate a recently crashed UFO, where the commanding officer of the alien force were killed on impact.
k.   Templates – assigning a personality template, perhaps with random variance within a species band, would make Ortnoks feel like Ortnoks and Tamans feel like Tamans.  This would approximate a crash with minor damage, allowing the aliens to begin to regroup.

One of the advantages of such a scheme, in my opinion, is the ability to start simply and expand in terms of complexity as the code evolves.

5
I came here recently as a new user (great game, by the way) and would imagine my experience was much the same as many new users.

1)  I did not create an account until I had my first suggestion for a new feature occur to me, prompting me to want to join the forum.

2)  It took me approx 15 minutes to find the answer.  My only annoyance was hunting for which of the many categories within the forum to search through for your easter egg.

6
When placing new installations it would be useful to see the shadow of the future radar envelope displayed on the Geoscape to more easily plan for maximizing coverage.

Note, I am playing the latest stable build (2.4).  If this has already been implemented in future releases please disregard.

Thank you for all the hard work on reviving a great classic game.

Pages: [1]