project-navigation
Personal tools

Author Topic: Coding Smarter Aliens ?  (Read 4187 times)

scamp

  • Guest
Coding Smarter Aliens ?
« on: June 25, 2008, 03:56:54 pm »
Hi,

I'm playing the game in the hardest mode ( I think it's called "Very Hard" level ) but I'm finding it very easy to do the levels.
A few key points I see when I play the game :
- Placing snipers near doors will prevent them from using that door ( or the windows near it ). Effectively I can put 1 sniper ( even a crappy one ) to guard 1 door all by itself.
- Aliens don't use grenades very well. Could we code an algorithm that would prefer grenades on small packs of PHALANX troops rather than guns ?
- Aliens don't use their TU's for reaction fire enough. I have had 1 alien once that used it, but usually I just walk into buildings with a scout ( I use all the TU's to get in , then out of the building, merely scouting positions ) and that scout never gets shot at. Maybe in buildings have some aliens guard the doors. I remember in the original UFO game that aliens would patrol doors a lot, and use reaction fire to throw grenades. This made the game a lot harder.
- Aliens don't crouch ?...
- Aliens come out of cover too quickly, even in Very Hard mode
- Aliens move around too much, especially in buildings, making it easy to spot them.

Maybe there could be a 'ultra-hard' mode , or 'godlike' mode programmed in that would make the aliens behave like PHALANX troops, sniping + crouching, patrolling, scouting and using door camping techniques more, and using more grenades ?
Perhaps give them some sniper rifles.

I realize I'm not really far in the game ( medium armor / 6 bases / plasma blasters etc ) so it might change, but I expect the aliens AI to not change too much over time.

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: Coding Smarter Aliens ?
« Reply #1 on: June 25, 2008, 04:07:41 pm »
This belongs in the bugs and feature suggestions frum. Moved.

Offline stevenjackson

  • Rookie
  • ***
  • Posts: 90
    • View Profile
Re: Coding Smarter Aliens ?
« Reply #2 on: June 25, 2008, 10:45:20 pm »

There are a few new features in 2.3 that i think should make the game harder.

For instance aliens have reaction fire.
Also someone is recoding the ai system i believe.

Steve

Offline blondandy

  • Sergeant
  • *****
  • Posts: 391
    • View Profile
Re: Coding Smarter Aliens ?
« Reply #3 on: June 29, 2008, 11:36:22 pm »
bobbens is looking at it IIRC.

using lua. has some code in svn branch.

unfortunately he is tied up with other projects, so progress here is slow

Offline shevegen

  • Squad Leader
  • ****
  • Posts: 224
    • View Profile
Re: Coding Smarter Aliens ?
« Reply #4 on: June 30, 2008, 11:21:50 pm »
What could be interesting in the far distant, would be that different aliens use certain "tactics".

For example, they could use a "cover me" tactic, which would mean that aliens would actively try to help each other.
Or they could use a stupid tactic "full assault", maybe they will kill a few.

Etc...
My point is here that aliens could sometimes behave "irrational" and might confuse the player.... let's say these simple tactics
have a chance of 30% to come in effect (determined before combat starts)

scamp

  • Guest
Re: Coding Smarter Aliens ?
« Reply #5 on: July 01, 2008, 01:34:28 am »
Great idea.
I also think that the mapping can be used to define some 'strategic' points in the map. Like you have say an airport, and the control tower would be a +10 strategic value 'area' for snipers. Aliens would try and 'defend' the watch tower, especially the higher floors.
also , the higher the grounds ( or floors ) the more 'strategic value' it should have. Maybe some access area's could have some strategic values too.

I like the 'tactics' for aliens idea. Maybe some standard formations, with snipers covering the assault groups, who in turn cover the grenadiers and the close combat ones ? The different tactics could be explained by having different leaderships ( coward aliens / aliens with a death wish etc )

Offline Nevasith

  • Rookie
  • ***
  • Posts: 98
    • View Profile
Re: Coding Smarter Aliens ?
« Reply #6 on: July 01, 2008, 12:34:20 pm »
Scamp, what do you meen by "strategic value +10"

Offline DanielOR

  • Squad Leader
  • ****
  • Posts: 238
    • View Profile
Re: Coding Smarter Aliens ?
« Reply #7 on: July 01, 2008, 07:41:42 pm »
I think he means it would be a higher priority target/area for the alien force.  The wiki hints at the pretty bluntly in base facility descriptions - it tell you that aliens will ignore living quarters and team rooms and head straight for command center and the anti-matter storage.

Surrealistik

  • Guest
Re: Coding Smarter Aliens ?
« Reply #8 on: July 04, 2008, 12:16:16 am »
Something that's especially important is weapon specific AI. The tactical behaviour of aliens should be primarily dictated by their weaponry.

Aliens with more inaccurate, limited range weapons (grenades, plasma series, and melee implements) should demonstrate aggressive behaviour. More specifically, they should strive to close distance safely, and stealthfully, ending turns behind cover with reaction fire primed (RF utilizing full auto equivalents if possible). Their primary tactical objective is to get within the maximum effective range of their most lethal firemode (full auto equivalents) and inflict maximum fatalities, using grenades intelligently against bunched Phalanx targets, or those behind considerable obstacles. Once potential targets are within effective range of their full auto equivalent modes, behaviour should become supremely aggressive, engaging PHALANX soldiers almost without exception, save in cases where an alien would not be able to achieve at least a 1:1 casualty ratio (such as when their targets are covered by vast amounts of reaction fire).

By contrast aliens with accurate, long ranged weaponry (particle series) should display more conservative behaviour, attacking at the maximum effective range of their most accurate firemode, and resorting to autofire, and otherwise more powerful, inaccurate shots only as distance warrants; where statistically autofire damage output will be greatest. Behaviour should overall remain highly aggressive, attempting to kill rather then retreat where an opportunity to inflict a fatality is statistically apparent.


Whether the infliction of a fatality is statistically apparent would be determined by the following equation:

Target's current health - ((Y * X) - Z) = Attack or alternate behaviour
 
Where X is equal to the average (with respect to damage variance) total raw damage of the selected fire mode assuming all shots hit, Y is the estimated hit rate, and Z is the protection value of the target's armour versus the damage type of the selected fire mode.

An alien should attempt to engage targets with the firemode that features the lowest possible output resulting from this equation as long as that output is equal to or less than 0. Otherwise, an alternate behaviour (gaining/closing distance, selecting full-auto reaction fire and seeking cover typically) should be opted for.
« Last Edit: July 04, 2008, 12:27:41 am by Surrealistik »

Sophisanmus

  • Guest
Re: Coding Smarter Aliens ?
« Reply #9 on: July 05, 2008, 04:29:24 am »
Hmm, I think that the damage formula to determine attack probability makes the AI a bit too statistically aware.  Perhaps a less-statistical comparison of enemies within LOS, alien health state, Reaction Fire already sustained that turn (whether it hit or not is less important), whether or not the human target is injured (below 75% health) or grave (below 50%), and whether the alien has TUs for additional attack(s) or movement.  This may become even more necessary as PHALANX begins to field more advanced armors that prevent death in 1, 2, or more hits from an alien melee weapon, and melee aliens refuse to close and attack in almost all cases.