Gin AI Postmortem

The AI I made worked pretty well. Adjusting the weights ended up being enough to make it win the tournament in class, without losing a match. It still followed the basic strategies I decided on early on, and didn’t use much prediction or tricks. It pretty much just played the numbers, and that was enough to win.

I believe a big part of the reason that my AI won is how other AIs played. I think most other people went with a more interactive and complicated strategy, involving trying to predict the other player’s moves and other similar strategies. I don’t think this helped as much as they expected, especially against my AI, which almost never picked up cards, meaning it rarely gave away information about its hands. My AI just played the cards and mostly ignored the other player, which helped it play consistently well against every other AI.

One thing that further proves this idea is something I found while adjusting the weights. I found that I could set every weight to zero except the weight for the value of cards, and it would still win against every other AI most of the time. With those weights, the AI would simply throw away the highest card in its hand that didn’t make a meld. To test this even more, I made a new AI that only added about 20 lines of code. It would pick up a discard if it made a meld, and then throw away the highest value card that was not in a meld. This is all that this new AI did, and it still beat every other AI most of the time. It even beat my AI a good amount of the time, but I think I had a slight edge.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s