>>1021291 (OP)
Perfect timing, I'm trying to make a combat AI for my game but I'm not sure how to do it, here's the general idea:
>turn based game with various elemental attacks
>everyone attacks at the same time but you don't get to see who attacked who with what, you must infer what happened from the aftermath
>A uses ignite on you but B also used douse on you so after the round you are engulfed in steam. Since you know B has douse and you also know that you didn't use a fire spell on yourself you might assume that A used a fire spell on you.
It's intended to be similar to Mafia/Werewolf where there might be a traitor in a given fight and you have to find out if someone is secretly attacking you.
Right now each of the AI maintain a list of all the spells they think their opponents have (some are known before the fight begins) and which tactic they think everyone (including teammates) is using. Tactics are kind of like a goal of how to damage an enemy, like "if they are wet -> use spell to dry them, if they are dry -> use spell to burn them, if they are on fire -> use spell to disable them". NPCs will give up and choose a new tactic if they are countered several times (the number depends on how stubborn they are), and their choice of new tactic depends on what tactic will take the least number of moves, is different from the current one, and can actually be accomplished with the spells they have available.
I'm fine with this (though I'm open to suggestions), but what I'm stumped on is how will they guess who used what spell on who to try and determine who the traitor is. I'd also like to have dialogue where they try and share information like
>B: "C is steamy 'cause I used douse on him to protect him from the traitor, who we know has fire magic"
>A (the traitor): "Bullshit, I'm the one who doused him, this man's lying!"
>C: "If you have douse then prove it, both of you douse yourselves next round"
And so on. It would be cool but I'd need a way to decide if they feel that sharing what they did last round (or lying about it) is useful to their goal. Would be much easier to keep dialogue limited to banter/observations and try and make the player think they're smarter than they really are but that wouldn't be nearly as cool.
>>1021296
I'd say FEAR's is the best, not the most complicated but they constantly yell out their tactics and there's a lot of ways for you to fuck with them which makes them both fair and fun to fight.