bobtheuberfish / chiriboga

Implements Netrunner in Javascript against an AI opponent
https://chiriboga.sifnt.net.au/
GNU General Public License v3.0
86 stars 11 forks source link

AI behaviour appears faulty #156

Open 25171275 opened 7 months ago

25171275 commented 7 months ago

Ran into a number of times where the AI would

vs Jinteki - Personal Evolution AI clicked for creds (40+) to the point where it was carelessly ditching high value agendas into archives (did not grab a log for this)

vs Weyland: Built to Last - AI continuously prioritised advancing Ice Wall to ridiculous levels (usually caps at 3 for other advanceable ice - first instance observed of AI). Tracelogs seem to indicate AI repeatedly setting preference to advance ice 10+ over... just about anything else, also pitching many cards into archives to focus on advancing Ice Wall. It does not appear that the AI identified Celebrity Gift as being an economy option. Previous matches against Built to Last have not encountered this issue.

Unclear if this is an isolated issue - this is the first observed instance of these behaviours which appear to be clearly defective. Otherwise, thank you for your hard work on Chiriboga!

chiriboga-log-2023-12-22T14_30_33.403Z.txt

bobtheuberfish commented 7 months ago

Thank you for this report. Without a log for the first one I am not able to diagnose it but please send a log if it happens again. With the second one it seems like I need to add some restrictions to the AI advancing Ice Wall. I can see from the log why it would make that decision - it doesn't have the cash to do anything else and is desperately trying to increase protection on R&D. It would need to click for credits three times to be able to play Celebrity Gift, which would use up a whole turn without increasing protection on R&D. I would love to hear any suggestions you have for logic/rules/clues I can give the AI to help it make a better decision in this case.

tysen2k commented 1 month ago

One useful thing I often use for my AI is that the evaluation function should have diminishing returns for any resource. So instead of making the value of R&D protection be linear with strength, make it proportional to sqrt(strength) or something like that.

bobtheuberfish commented 1 month ago

That seems like a sensible plan! Thank you for the advice, I will consider how I can put it to work in the algorithm I am using.