Skip to content

Commit 05c8a2e

Browse files
committed
wrote Hanabi AI post
1 parent 233f5e9 commit 05c8a2e

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

_posts/2015-02-16-hanabi-ai.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
layout: layout
3+
title: Hanabi AI
4+
---
5+
6+
[Hanabi][ha] is a card game that my friends and I have recently gotten into.
7+
It's cooperative and you hold your cards face out, so you can see everyone
8+
else's cards but your own. As a team, you're trying to communicate the best
9+
plays to each other, although the game limits how much you can say.
10+
11+
I've come up with a Hanabi strategy for the five player game that is somewhat
12+
complicated, but I suspect is capable of winning nearly all of the time. It's
13+
complicated enough that I won't try to explain it here (I'm not even going to
14+
explain the game). It's also deterministic, and not computationally
15+
difficult---it's at least conceivable that humans could play it, although it'd
16+
take practice to learn.
17+
18+
So of course I decided it'd just be easier to program the computer to play it.
19+
Now I'm one long weekend and 500 lines deep, and I haven't managed to win a game
20+
yet. I've learned a lot in the process---I previously hadn't done any object
21+
oriented programming in Go, and now I feel like a master of interfaces.
22+
23+
I've also come to appreciate just how smart humans are. One aspect of my
24+
strategy involves expecting another player to take a particular action, and then
25+
adjusting one's own plan if they don't. That sentence took 23 words, and 138
26+
characters. It could be a tweet. I haven't even started to figure out how I
27+
should implement it. (Actually, now that I write this, I think I know what to
28+
do.)
29+
30+
Anyway, if you want to know more, my code is [on Github][gh].
31+
32+
[ha]: http://www.amazon.com/dp/B00CYQ9Q76?tag=stechschulten-20
33+
[gh]: https://github.com/JStech/hanabi-ai

0 commit comments

Comments
 (0)