Recommend
3 
 Thumb up
 Hide
11 Posts

Hanabi» Forums » General

Subject: Hanabi-style game for online play rss

Your Tags: Add tags
Popular Tags: [View All]
Timothy B
msg tools
Hello all

I'm currently doing an MSc computer science course, and as part of this we have to do a programming project. I also happen to be a big Hanabi fan and so I'm planning to implement a computer version of the game for the project including an AI capable of working with human players to produce a nice firework display

Would there be much interest from people here in play-testing for such an endeavour? I'm planning to start with a multi-player implementation for humans only, and then using the results of gameplay in development of an AI.

Any suggestions/comments are welcome.

(X-posted to Hanabi/Ikebana board)
4 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Adam Kunsemiller
United States
Indianapolis
IN
flag msg tools
badge
Mischievous Hobbes is Mischievous
Avatar
mbmbmbmbmb
I'd be interested, and I know several of my friends would be as well. For ai thoughts, I would encourage you to read the giant strategy article that I posted in these forums and consider implementing some principles from that. I think a satisfying AI for Hanabi would be a fascinating project, best of luck!
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Phil S. Stein
United States
Brooklyn
New York
flag msg tools
badge
Avatar
mbmbmbmbmb
I don't know what your interface will be, but I have an IRC (non AI) version of Hanabi deployed and running on Freenode. The code is BSD licensed and available if you want it.

The code is here: https://github.com/philsstein/hanabIRC
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Ghislain LEVEQUE
France
flag msg tools
Avatar
mbmbmbmbmb
I would be interested!
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Arthur O'Dwyer
United States
San Francisco
California
flag msg tools
designer
mbmbmbmbmb
tbentropy wrote:
I'm currently doing an MSc computer science course, and as part of this we have to do a programming project. I also happen to be a big Hanabi fan and so I'm planning to implement a computer version of the game for the project including an AI capable of working with human players to produce a nice firework display.

Would there be much interest from people here in play-testing for such an endeavour?

Sounds interesting. I wouldn't mind subscribing to your newsletter.

Coincidentally, I just played Hanabi for the first time yesterday, and this morning I wrote a little AI Challenge–style Hanabi "moderator" in C++, with the goal of trying out different strategies using AI "bots" as the players. I'll post more about it later this week, once I've got a bot up and running that can do more than "play random cards until all the mulligans are gone."
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Birgit Stolte
Germany
flag msg tools
mbmbmbmbmb
Hi,

Is your project running yet? I would be interested to join,

Birgit
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Arthur O'Dwyer
United States
San Francisco
California
flag msg tools
designer
mbmbmbmbmb
Quuxplusone wrote:
Coincidentally, I just played Hanabi for the first time yesterday, and this morning I wrote a little AI Challenge–style Hanabi "moderator" in C++, with the goal of trying out different strategies using AI "bots" as the players. I'll post more about it later this week, once I've got a bot up and running that can do more than "play random cards until all the mulligans are gone." :)

I totally forgot about this until Birgit bumped the thread again! I do have a GitHub link for my C++ Hanabi project, including an AI that can do pretty well:

https://github.com/Quuxplusone/Hanabi

(This is not network-enabled, and not related to the OP's MSc project.)
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Timothy B
msg tools
https://github.com/tbentropy/hanabi

I have to admit developing this has been tougher than I thought it would be, only just finished the UI/game engine and haven't had any time for AI considerations at all. Ah well!

Once I get the project report handed in I plan on finishing off the game and hosting it somewhere (needs a prettier UI too!)


Quuxplusone wrote:
Quuxplusone wrote:
Coincidentally, I just played Hanabi for the first time yesterday, and this morning I wrote a little AI Challenge–style Hanabi "moderator" in C++, with the goal of trying out different strategies using AI "bots" as the players. I'll post more about it later this week, once I've got a bot up and running that can do more than "play random cards until all the mulligans are gone."

I totally forgot about this until Birgit bumped the thread again! I do have a GitHub link for my C++ Hanabi project, including an AI that can do pretty well:

https://github.com/Quuxplusone/Hanabi

(This is not network-enabled, and not related to the OP's MSc project.)

Fascinating! I wish I'd spotted this earlier, would've been interesting to incorporate it into the UI I've developed and see how the various AI approaches fair in games with humans (I'm quite interested in how to develop a computer player for Hanabi which can actually work with humans in a way which makes sense). Given my deadline is in 2 days I think I'll have to save that for the future though.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Geoff Hom
United States
Sacramento
California
flag msg tools
mbmb
Arthur, I looked at your GitHub and it's fascinating. (I learned Hanabi recently and have been contemplating some sort of computer version. Maybe use it as an excuse to try Swift.) I haven't looked at the code deeply, but I had some questions if you don't mind answering?

1) What does the CheatBot do, in general? You mean it's like everyone's playing face-up?

2) Why do you say the best possible average is 24.89, because "the last one or two cards in the deck might be 5s." Everyone still gets one last turn, right?

3) Since you've coded this, what are your overall thoughts on Hanabi? Is it boring and solved/solvable to you now?

4) Does your AI use any conventions, especially controversial ones? I know some players have "bluffs," "finesse," "reverse finesse," and also conveying the order they will discard cards, even from the beginning. (E.g., "If I discard, I always discard the left-most card.") I'm still wrestling with what I think of these various strategies/conventions, both in terms of game spirit and how much they help/hurt the player.

Thank you for all your hard work! Geoff
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Arthur O'Dwyer
United States
San Francisco
California
flag msg tools
designer
mbmbmbmbmb
geoffhom wrote:
Arthur, I looked at your GitHub and it's fascinating. (I learned Hanabi recently and have been contemplating some sort of computer version. Maybe use it as an excuse to try Swift.) I haven't looked at the code deeply, but I had some questions if you don't mind answering?

Sure. You can also reach me by email, more reliably; I don't check BGG very often. :)

Quote:

1) What does the CheatBot do, in general? You mean it's like everyone's playing face-up?

Yes, that's right. It illegally peeks at its own cards.

Quote:

2) Why do you say the best possible average is 24.89, because "the last one or two cards in the deck might be 5s." Everyone still gets one last turn, right?

In the variant of Hanabi I coded up, the game ends as soon as the last card is drawn. I did that because I didn't want to deal with the corner cases. In my variant, each player ALWAYS has four cards in hand, period. I might revisit this and encode the real Hanabi rules someday.

Quote:

3) Since you've coded this, what are your overall thoughts on Hanabi? Is it boring and solved/solvable to you now?

No, definitely not. It is sometimes a bit frustrating, though. Sometimes I see a possible play but I can't use it because it relies on one or more of my fellow players making a logical deduction that I can't 100% guarantee they'll make, or remembering a convention that I can't 100% guarantee they'll remember. I think playing with humans is basically a different game than "playing" with AIs: playing with humans means trying to account for their fuzzy logic (a la Texas Hold'em), while AIs can play the game more like chess.

Quote:

4) Does your AI use any conventions, especially controversial ones? I know some players have "bluffs," "finesse," "reverse finesse," and also conveying the order they will discard cards, even from the beginning. (E.g., "If I discard, I always discard the left-most card.") I'm still wrestling with what I think of these various strategies/conventions, both in terms of game spirit and how much they help/hurt the player.

Emphatically yes! The whole point of the AI is to try to squeeze as much data into its "hints" as possible. For example, one bot uses the rule "If I discard, I always discard a known-worthless card; or, if I have no known-worthless cards, I'll discard the oldest not-known-valuable card," where "worthless" is defined as "no longer playable at any point in the future" and "valuable" is defined as "the only card of its type left in play." (For example, all 5s are automatically valuable.) Since all the bots at the table know this rule, they are able to postpone warning about valuable cards until right before the valuable card would be next on the chopping block.

Consider the strategy "If I hint to you that you have one red card, that means 'play the second card from your left'. If I hint that you have two red cards, that means 'play the second card from your right'..." I have no moral qualms about using such a strategy with my bots. The only reason I don't use such a strategy is that I don't think it would be a very good strategy! :) There aren't enough hint tokens to make a strategy out of "one hint, one play, one hint, one play"; you have to encode a LOT of useful information in each hint, and so far it seems like that pretty much means that you have to play "in the spirit of the game": hint about playable cards, hint about valuable cards, and not much else.

One convention I just thought of, which I might try coding up later this week and see if it helps, is: "If I have two known-worthless cards in my hand, normally I'd discard the oldest. If instead I discard the *second* oldest, that means that you (the next guy who doesn't have a play already in mind) should attempt to play your newest unknown card." That's the sort of bot-friendly convention about which I have no qualms. :)
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Dylan Thurston
United States
Bloomington
Indiana
flag msg tools
Avatar
mbmbmbmbmb
Quuxplusone wrote:
No, definitely not. It is sometimes a bit frustrating, though. Sometimes I see a possible play but I can't use it because it relies on one or more of my fellow players making a logical deduction that I can't 100% guarantee they'll make, or remembering a convention that I can't 100% guarantee they'll remember.
In my experience, you won't get the best results if you try for 100% guarantees. Sometimes you have to make leaps of faith in your fellow players. Of course you also need to gauge their skill level; to me, that is part of the fun as an experienced player, figuring out how much I can throw at some new-ish player.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls