zchcai / hahaha-bot

A mainly rule-based robot to play Hanabi with human by intuitive conventions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hahaha-bot

Current Progress: █░░░░░░░░░ 10%

This repo will implement a mainly rule-based robot to play with humans. It is forked from Hanabi-Live/hanabi-live-bot because we want to make the use of hanab.live's powerful UI features to play, watch and review Hanabi games interactively with robots in a more human-friendly way.

Setup Instructions

  • Install the dependencies:
    • pip install -r requirements.txt
  • Set up environment variables:
    • cp .env_template .env
    • vim .env
  • Run it:
    • python main.py
    • python main.py <robot_username_(password)_2> <robot_username_(password)_3> ...
  • In a browser, log on to the website and start a new table.
  • In the pre-game chat window, send a private message to the bot(s) in order to get them to join you:
    • /msg [robot_username] /join
  • During the game, sometimes the bot forgets to play, then we can send a message to remind them:
    • /msg [robot_username] /please
  • Then, start the game and play debug! 😅
    • We can use this to let it print debug information:
      • /msg [robot_username] /debug

Development Tips

  • Run pip3 install pytest-watch and open a terminal to run pytest-watch. It will automatically check the unit test code coverage when files get changed.
  • (Optional) If using VS Code, then install Coverage Gutters and run Coverage Gutters: Watch. It will read the auto-updated lcov.info file and update the coverage lines accordingly.

About

A mainly rule-based robot to play Hanabi with human by intuitive conventions.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%