Development > Newbie Coding

Artificial Intelligence

<< < (5/11) > >>

kurja:
As for ai team effort, maybe some simple rules to that effect could be put in place without too great effort to at least make the ai seem smarter, such as when choosing a target, first check the targets already in sight (if such function already exists?) and prefer to choose a target that has already been fired at during that turn (if there is such target)? Would make the alien fire more effective.

...now that I think about it, that's probably not a five minute implementation either ;)

H-Hour:

--- Quote from: Duke on June 05, 2012, 12:51:56 am ---And a pretend-to-be-smart algo will never cover 100% of the situations.
So at least smart players will recognize the patterns for those remaining %s and either file *bug reports* or exploit them.

--- End quote ---

Hmm, I would think that a "smart" AI would actually be much more predictable than a dumb AI, as long as the dumb AI was programmed to take different decisions randomly.

Thargor:
I think a better AI is something that can be done if we keep in mind that AI serves one purpose only:
Enhance the gameplay/immersion

Currently two things break the immersion/realism:
- AI getting stuck
- predictability

To fix this we don't need super intelligent code, but something that makes users believe it's intelligent.
Randomness is a big help here. If the AI has a list of reasonable actions and chooses randomly from them it will appear smarter.

Rember good ol' pacman, where the "AI" when at a junction chose randomly between moving towards the player or away from it.
It therefore on avarage chased the player but not in a game-breaking-impossible-to-beat way.
By giving different enemies different chances of choosing the direction of the player the programmers made the player believe some enemies were more aggressive than others

Randomness may also help prevent AI getting stuck. Almost any algorithm has weak points where AI can get stuck, but by randomly switching chances of getting stuck for a long time reduce drastically.

As another example:
In a FPS an enemy is running towards the player and we want it to dodge incoming fire.
one option would be to let the AI check for fire, determine dodge options, taking into account travel time, bullet speeds, ammo of player etc..
A much more CPU-friendly option is to assume the player is trying to hit the enemy and just randomly dodge left and right.
Most human players will assume the enemy is actually responding to their fire.

hitch-22:
New forumite here. Love the idea and execution so far, loved the original game back when etc etc...

I've tried my hand at (very little) coding and in some project ideas for games we've kicked around with my game-industry friends I've put some thought into implementing AI rulesets. I'd like to contribute something to this discussion if I possibly can. As it currently stands, if the latest release were as stable as 2.4 was for me and had less predictable AI, it would already be a true gem of an open source game, or a game in general.


--- Quote from: Thargor on August 08, 2012, 02:24:57 pm ---Currently two things break the immersion/realism:
- AI getting stuck
- predictability

To fix this we don't need super intelligent code, but something that makes users believe it's intelligent. Randomness is a big help here. If the AI has a list of reasonable actions and chooses randomly from them it will appear smarter.
--- End quote ---

I strongly agree with this. This game most definitely is not chess, and coding should not or at least need not IMHO be bogged down by overly ambitious goals like aliens actually "thinking" about their situation. I think a few RNG-determined behavioral options and just perhaps some very basic tactical awareness might make for some surprisingly immersive moments, and it really might take surprisingly little to improve gameplay by leaps and bounds.

That having been said, I'd like to know a few things about the scope that might be possible. For instance, is it possible to implement...

..different rulesets for different species? (Or at least, bloodspiders do the kamikaze run that all aliens currently do, and all the more tactically versatile ones do something else?)

..different rulesets for attacking and defending missions? (Aliens roughly hunt you in base attack, and seek to ambush when you attack them.)

..rulesets depending on weapon characteristics? (Mainly range, just maybe, possibly area of effect?)

..rules about the alien's current surroundings? (Partial cover / good field of fire in one direction, good cover behind = great place to camp.)

..multiple random choices for behavior, where the likelihood of each is affected by certain parameters (distance to enemy, whether in good position currently, whether things have been going well up to this etc)?

..situationally assigned, temporary or permanent flags for actors, locations, objects, etc? ("Don't return to this area until enemy is there", "Since I'm unarmored, RUN from this guy / type of gun that mauled my friend!", "Hmm.. that dude seems to be out of ammo, maybe I'll eat him...")



As I said, I'd like to pitch in with silly ideas if I can.

H-Hour:
Everything you mention is possible. None of it is already performed in the code, except some weapon characteristics.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version