octachrome / treason

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

AIs exchange far too often in the endgame #26

Open Hypak opened 5 years ago

Hypak commented 5 years ago

screen shot 2019-02-16 at 12 07 00 AIs with ambassadors seem to trade about 90% of the time in certain scenarios, even though taking income/foreign aid would help them win. This can lead to exceedingly long games of AIs exchanging their cards repeatedly. They may have exchanged 50 times each in the game that the screenshot's from.

octachrome commented 5 years ago

Haha nice screenshot. Can you figure out what situations this occurs in so I could reproduce it?

Hypak commented 5 years ago

Based on the exposed cards, there are 3 ambassadors, 2 contessas and a captain remaining. Playing the captain is useless as they know the other person has an ambassador, which means that the only reasonable role to play is the ambassador. I imagine that the issue occurs because they play ambassador over income/foreign aid by default, and will only choose income/foreign aid on the 10% of moves that are random. A solution to this would be to make them only choose ambassador when it is feasible that they might get a better card (one that they would choose to play over ambassador).