Page 1 of 2
Hanabi's situation generator
Posted: 10 May 2023, 21:24
by Blacktango
Hi, I created a tool to generate and share hanabi’s situations:
https://hanabi.devnotebook.fr.
Feel free to use it and give me some feedback.
You can specify the following information :
- player's hands
- cards played
- cards discarded
- names of the players
- number of cards remaining in the deck
Then, when you click the button, you can see the preview, and copy the link to share the situation (without displaying the form), or even download the generated image.
Here's an example with a basic finesse :
Code: Select all
XX, XX, XX, XX, XX
(G1), XX, XX, XX, XX
XX, !(G2), XX, XX, XX <- G
Link:
https://hanabi.devnotebook.fr/display/? ... XX%2C%3C-G
Image:

- téléchargement.png (7.36 KiB) Viewed 977 times
Re: Hanabi's situation generator
Posted: 10 May 2023, 22:55
by Blacktango
Improvment ideas :
- [DONE] add the colors used outside of BGA (at least Purple and Teal). Then it requires changing the color of the Multi.
- [DONE] handle cards touched by all number clues (ex: known as 3, but actually a 5)
- [DONE] add more color variants referenced by the H-Group (Pink and Brown)
- [DONE] handle BK and K for black cards
- [DONE] handle multiple clues to a same player (! prefix for the first clue, ? for the second)
- add a warning when the situation is invalid (or at least not handled)
- handle multiple notations (ex: parenthesis mean clued)
Re: Hanabi's situation generator
Posted: 13 May 2023, 05:39
by ExaltedAngel
I think it's a great idea, if people get used to it could become the standard to talk about situations in the forum
Re: Hanabi's situation generator
Posted: 13 May 2023, 08:58
by Malo77
Nice!
I suggest 2 little additions:
I see you can show several clues, as shown on your website example, so we would need the clue order:
you could add a little number next to the clue (on far right) to show in which order there were given.
The order can have some meaning.
It would also be nice to allow K / Bk / BK for blacks
What language do you use ? do you share the code ?
Re: Hanabi's situation generator
Posted: 13 May 2023, 12:46
by Blacktango
Hi, thanks for the feedback!
Np to allow more names for blacks, I can easily add color names while there are no duplicates in the initials of color list.
Handling multiple clues seems like a great idea, but this is hard work.
Now, there is no relation between the clue at the end of the line, and the cards marked by the clue.
This means that you can indicate a Y2 is marked by a G clue, without any validation, just by prefixing it with a
! character.
I guess I could allow more prefix characters:
Code: Select all
!(B1), ?(R2), #(M3), @(B3) <- B, 2, 3, B
!,
?,
#,
@ would respectively mean 1st, 2nd, 3rd and 4th clue.
But then it should actually be:
Code: Select all
!(B1), ?(R2), #(M3), !#@(B3) <- B, 2, 3, B
This would complicate the notation and the display (now we need enough space to display more than 1 clue above a card).
Maybe allowing only two clues for the same card would be enough for most situations ? What do you think?
About the code, you can find it here :
https://framagit.org/games/hanabi-situation-generator
This is
node and basic
JavaScript. The main complexity is the regexp part.
EDIT: Multiple clues feature is now implemented (2 clues max)
Re: Hanabi's situation generator
Posted: 23 June 2024, 00:09
by Blacktango
Hello, a new version of the
generator is available.
This new version allows you to configure your situation just by clicking.
This application allows you to represent a game situation, and to share it as an image that you can download, or as a link that you can copy-paste.
When you think your situation is ready, check the
read-only checkbox in the menu bar and click on the button you need.
Here are a few other features:
Color set: you can choose the color sets to use (BGA or H-Group), by clicking the
gear icon button in the top menu bar
Text version: you can copy-paste a text version of the situation, by clicking the
T button in the top menu bar.
URL conversion: if you used the old URLs of the previous generator version, you can convert them to the new ones, by clicking the
wrench icon button in the top menu bar. Anyway, the old URLs will be automatically redirected to the new ones.
Feel free to use this application and to give me some feedback.
Re: Hanabi's situation generator
Posted: 25 June 2024, 18:24
by Stroom
It's not only about the static situation >>> what is your move?
There is also the context that matters. Who has given which clue in the previous turns. Not only about the negatives but what other finesses and bluffs have been given. So you might know what another player might do other than discard chop.
Re: Hanabi's situation generator
Posted: 25 June 2024, 18:57
by Blacktango
Yeah, you're right.
A picture really helps me to understand what someone is describing, but the text they write to explain the situation is still the more important.
Re: Hanabi's situation generator
Posted: 25 June 2024, 19:06
by Romain672
Stroom wrote: ↑25 June 2024, 18:24
It's not only about the static situation >>> what is your move?
There is also the context that matters. Who has given which clue in the previous turns. Not only about the negatives but what other finesses and bluffs have been given. So you might know what another player might do other than discard chop.
If there is another finesse going on, I like to include it in the problem. Like saying A clues red on r2 to D. Then B clues that complicated thing.
If the context is extremely complicated, I like the full access to the game replay.
Re: Hanabi's situation generator
Posted: 26 June 2024, 07:13
by Stroom
Romain672 wrote: ↑25 June 2024, 19:06
Stroom wrote: ↑25 June 2024, 18:24
It's not only about the static situation >>> what is your move?
There is also the context that matters. Who has given which clue in the previous turns. Not only about the negatives but what other finesses and bluffs have been given. So you might know what another player might do other than discard chop.
If there is another finesse going on, I like to include it in the problem. Like saying A clues red on r2 to D. Then B clues that complicated thing.
If the context is extremely complicated, I like the full access to the game replay.
I think that often the problem is that the person who creates the situation, might not even understand the full context by himself so he creates it incorrectly. He might not know some concepts so he leaves it out. Or someone is trying to make a more clever move that is outside of the box so people would have to also think outside of the box for several moves.