bnordli / rftg

Race for the Galaxy AI
173 stars 32 forks source link

Example of Severely Faulty AI Logic? #35

Closed dsnvwlmnt closed 7 years ago

dsnvwlmnt commented 7 years ago

How can a million simulations (or w/e) result in such an atrocious play? Save file at the bottom, you can follow along as i debugged the cards on my stream last night. Red AI has Space Marines, Galactic Home Front, and Galactic Clearing House in hand at the time of the "mistake". 4p Xeno Invasion.

https://www.twitch.tv/unsane/v/104246282?t=135m20s

RFTG Save 0.9.5 1480478009 4 5 0 0 0 none 35 1 0 2 70 35 1 0 0 0 2 7 -1 0 5 -1 1 51 0 5 86 2 30 86 0 6 0 2 90 51 0 12 0 1 86 0 23 1 0 2 69 101 1 4 0 0 2 3 -1 0 5 22 2 24 22 0 5 -1 0 0 30 1 0 2 159 163 1 115 0 0 2 5 -1 0 5 -1 0 0 5 8 3 104 8 120 0 6 0 2 58 104 0 23 1 0 2 47 148 1 117 0 0 2 3 -1 0 5 17 2 26 17 0 5 -1 0 0 twitch_tv_unsane

bnordli commented 7 years ago

(It also got Adaptable Uplift Race from the explore.)

Was the problem that it called naked Settle? The audio is partly gone from your feed (TBH, I prefer no music in streams), so I cannot hear your discussion during the original play through.

bnordli commented 7 years ago

Actually, its action scores (those are weighted win probabilities btw) are pretty close: E+5: 0.029065120042269018 E+1: 0.027816044001580123 II: 0.029496412247560805 III: 0.030002257117398057 $: 0.029284274395807674 X2: 0.029284274395807674 V: 0.025693818133120008

I don't have time to debug the AI more than this. Its behavior is pretty opaque, and trying to fix this specific issue can introduce errors in other scenarios.

dsnvwlmnt commented 7 years ago

The audio works for the main linked section where i discuss this issue.

Yeah the issue is the naked settle. Seems nonsensical with Space Marines, the 5 windfall, and the 5 dev in hand. Seeing the win %'s tho, and if i'm understanding correctly, i guess it was pretty much screwed no matter what it did, basically pick a phase at random and they all have almost the same winrate, with III being ever so slightly better. Probably nothing more to see here.

I'm guessing there's no way to see these win% #'s without a special debug version?

bnordli commented 7 years ago

I agree.

The code for these statistics are commented out by the DEBUG directive, so you need to compile the program yourself to see them.