octachrome / treason

A clone of the card game Coup written in Node.js
Other
138 stars 79 forks source link

AI should take foreign aid instead of income if somebody else did that successfully #21

Open einsteinsfool opened 6 years ago

einsteinsfool commented 6 years ago

I saw 2 dukes revealed so I decided to take foreign aid. After me an AI taked income instead of foreign aid as well. It sometimes might be a good idea to take income instead of foreign aid if we don't want to be killed but imo it's too advanced for AIs and they should always take foreign aid when it's possible.

I'll try to implement that but reporting not to forget.

The question is, what should AI do when someone successfully takes foreign aid and then duke is used without being challenged. Should AI assume that the duke was a bluff or to take income without risk? Any ideas?

octachrome commented 6 years ago

Good idea to take foreign aid once someone else has done so successfully. It might be sensible to add some randomness to that decision, to prevent humans exploiting the AI by taking foreign aid then waiting for the AI to follow suit, then blocking them, so the AI loses out on a turn.

Perhaps the AI could keep a score of how many times people have taken foreign aid minus how many times people have taken tax, then use that score to weight a random decision. E.g., when the score is high, the AI is more likely to take foreign aid; when the score is low, the AI is less likely to.

einsteinsfool commented 6 years ago

Yeah. Good idea. And the count should start since the last successful block with duke. So when somebody blocks foreign aid, the number resets to 0.