Python scripts to analyze hanabi instances, providing interfaces to hanab.live, a local game database and analysis tools.
Find a file
2023-06-24 17:37:56 +02:00
database database: add entry for starting_player 2023-06-24 17:22:37 +02:00
log_setup rework logging to log into separate files 2023-05-20 14:32:42 +02:00
.gitignore update gitignore 2023-06-24 17:25:54 +02:00
cheating_strategy add txt file with strategy 2023-05-25 17:00:53 +02:00
check_game.py clean up imports 2023-05-20 14:40:29 +02:00
compress.py fix generation of links 2023-05-20 14:31:43 +02:00
constants.py add 6th initial to color initials 2023-05-13 13:06:49 +02:00
deck_analyzer.py deck analysis: check for dark cards at bottom of deck 2023-06-24 17:24:11 +02:00
download_data.py download: support instances with some special options 2023-06-24 17:23:05 +02:00
greedy_solver.py greedy_solver: add back Dispensable CardType to allow old greedy solver to function 2023-06-24 17:25:07 +02:00
hanab_live.py hanabi instances: support differnt starting players 2023-06-24 17:23:29 +02:00
hanabi.py hanabi.py: raise error if to-be-replaced card is not in hand 2023-06-24 17:21:55 +02:00
hanabi_suite.py add command-line flag to enable verbose printing to terminal 2023-05-20 14:38:38 +02:00
instance_finder.py update instance finder to new db. supports timeouts now 2023-06-24 17:24:37 +02:00
old.py add old.py file for old code 2023-05-13 23:10:00 +02:00
README.md add README 2023-06-24 17:37:56 +02:00
requirements.txt update requirements 2023-06-24 17:25:19 +02:00
sat.py add option to set minimum pace in sat solver 2023-05-20 21:45:51 +02:00
site_api.py improve overall logging, use verbose logger 2023-05-14 23:57:24 +02:00
test.py update test file 2023-06-24 17:25:25 +02:00
variants.py add max score to variants 2023-06-24 17:23:49 +02:00

Hanabi-Suite

This is my personal attempt to write hanabi-related code to analyse and play around with the game. The main goals of the code are:

  • Provide an easy-to-use interface that supports all the variants available at hanab.live (some variants not supported yet)
  • Store data in a local database that mirrors (part of) the hanab.live database
    • This allows local analysis of a large sample of real-world hanab games played
    • It also allows us to store additional data for games / seeds etc, like: Is this seed theoretically winnable etc
  • Develop fast, exact algorithms to test for feasibility of instances
  • Develop bots that can play hanabi reasonably well, both for cheating and solitaire versions of the game
  • Have analysis tools for actual games played (from which turn onwords did we lose? What was the correct winning line in the end?)

Apart from the obvious use-cases for some features, I want to explore boundaries of the following questions:

  • What percentage of games is theoretically winnable, assuming perfect information? (solitaire play)
    • To answer this, we need fast, exact algorithms and run them on larg samples of seeds
  • What percentage of games is theoretically winnable by only looking at drawn cards, but not into the draw pile (cheating play)?

Alternative stuff that I would also like to try out eventually

  • Have some sort of endgame database, both for solitaire and cheating play
  • Develop certificates for infeasibility of hanab instances (I don't think the problem lies in coNP, but for real-world instances, most decks seems to have a short explanation on why they are not winnable)
  • Have analysis tools that can compute optimal moves in cheating play for endgame situations (and display winning percentages)
  • Analyse every seed on hanab.live for feasibility

Clearly, there is still much work to do, any contributions, suggestions etc are welcome