Jim the Dinosaur
Arcane
- Joined
- Nov 19, 2009
- Messages
- 3,144
Because it's now more or less possible and I like feature creep I've decided to try and improve upon the AI:
What's good about the Fallout AI is the variety of actions it can take, like:
-move
-attack
-pick up items off the ground
-switch weapons
-use chems
-flee*
Combined with selecting targets based on differing factors such as weakness or proximity, that's already a pretty good list. What is, however, deeply wrong with the AI is that it (a) doesn't check which action to perform nearly often enough, and (b) makes poor calls when it does.
An example of the first point is that a ranged critter will (correctly) decide to move if he can't hit his opponent, but then (idiotically) doesn't check again which action to take that turn until he's standing one hex away from him, even if moving just one hex would offer him a nice shot and getting too close to his opponent would be insane. Similarly, the AI won't consider moving after having made an attack, even if a single step to the left would put him in cover. Another example is that weapon selection occurs only when a critter runs out of ammo or loses his weapon.
An example of the AI taking poor decisions is that positioning is completely irrelevant to him. He'll gladly huddle around his buddies while his opponent is lobbing grenades, or keep standing in a nice line to be bursted down. Weapon selection, in the rare cases it does occur, is simply an affair of seeing which weapon deals the highest max damage (and, for some weird reason, the lowest min damage) and if he has enough AP left to use it that same turn. Things like called shots, secondary attacks, and whether or not to use area attacks are also completely randomized.
So my priority lies with improving these two elements (though I'd also like to increase the variety eventually by having the AI pick locks, heal allies, take weapons/ammo from containers, not just the ground, etc.).
To do this, having the AI perform its actions in smaller "segments" (e.g. moving till within range of its enemy, attacking, then checking whether it has enough AP left to walk back into cover in the classic three-part peek around the corner trick), and having it pay more attention to its weapon selection (conserve ammo against weak opponents, use area attacks against groups, etc.), movement (spread out when advisable, seek cover rather than flee willy nilly when scared, etc.) and skill usage would already be a large step forward.
An example to show the problem with the AI not making decisions frequently enough:
The AI can't see me, so he decides to move towards me. He doesn't check whether he can attack until he reaches me (at which point he has no more AP's left), even tho he has a ranged weapon and I could one-hex burst him to bits the next turn. An early version of a possible "cautious" AI approach that makes more frequent decisions:
I was hoping on some imput on interesting AI possibilities. Maybe some games do interesting things (JA2?)?SCO tuluse, you guys were talking about the crappiness of the AI in the shoutbox a short while ago, some additional ideas maybe?
DraQ, I remember you had some very interesting ideas throughout this thread that I commonly dismissed because I didn't see it working in combination with the default AI, which I can of course just look up again when I'm not feeling lazy. The one I do remember is timed grenades, which I should be able to now implement and have the AI respond to/use itself.
*: fleeing is of course an annoying problem outside of its brainlessness. I'd prefer moving to a system of either withdrawing behind cover or surrendering.
What's good about the Fallout AI is the variety of actions it can take, like:
-move
-attack
-pick up items off the ground
-switch weapons
-use chems
-flee*
Combined with selecting targets based on differing factors such as weakness or proximity, that's already a pretty good list. What is, however, deeply wrong with the AI is that it (a) doesn't check which action to perform nearly often enough, and (b) makes poor calls when it does.
An example of the first point is that a ranged critter will (correctly) decide to move if he can't hit his opponent, but then (idiotically) doesn't check again which action to take that turn until he's standing one hex away from him, even if moving just one hex would offer him a nice shot and getting too close to his opponent would be insane. Similarly, the AI won't consider moving after having made an attack, even if a single step to the left would put him in cover. Another example is that weapon selection occurs only when a critter runs out of ammo or loses his weapon.
An example of the AI taking poor decisions is that positioning is completely irrelevant to him. He'll gladly huddle around his buddies while his opponent is lobbing grenades, or keep standing in a nice line to be bursted down. Weapon selection, in the rare cases it does occur, is simply an affair of seeing which weapon deals the highest max damage (and, for some weird reason, the lowest min damage) and if he has enough AP left to use it that same turn. Things like called shots, secondary attacks, and whether or not to use area attacks are also completely randomized.
So my priority lies with improving these two elements (though I'd also like to increase the variety eventually by having the AI pick locks, heal allies, take weapons/ammo from containers, not just the ground, etc.).
To do this, having the AI perform its actions in smaller "segments" (e.g. moving till within range of its enemy, attacking, then checking whether it has enough AP left to walk back into cover in the classic three-part peek around the corner trick), and having it pay more attention to its weapon selection (conserve ammo against weak opponents, use area attacks against groups, etc.), movement (spread out when advisable, seek cover rather than flee willy nilly when scared, etc.) and skill usage would already be a large step forward.
An example to show the problem with the AI not making decisions frequently enough:
The AI can't see me, so he decides to move towards me. He doesn't check whether he can attack until he reaches me (at which point he has no more AP's left), even tho he has a ranged weapon and I could one-hex burst him to bits the next turn. An early version of a possible "cautious" AI approach that makes more frequent decisions:
I was hoping on some imput on interesting AI possibilities. Maybe some games do interesting things (JA2?)?SCO tuluse, you guys were talking about the crappiness of the AI in the shoutbox a short while ago, some additional ideas maybe?
DraQ, I remember you had some very interesting ideas throughout this thread that I commonly dismissed because I didn't see it working in combination with the default AI, which I can of course just look up again when I'm not feeling lazy. The one I do remember is timed grenades, which I should be able to now implement and have the AI respond to/use itself.
*: fleeing is of course an annoying problem outside of its brainlessness. I'd prefer moving to a system of either withdrawing behind cover or surrendering.