WillFlame14 / hanabi-bot

A bot that plays on the hanab.live interface.
GNU General Public License v3.0
16 stars 10 forks source link

Empty clues crash the bot #462

Open Columbus240 opened 20 hours ago

Columbus240 commented 20 hours ago

Version : v1.8.1 Convention settings: H-Group. tested levels 1, 2, 11 Steps to reproduce or replay link:

Additional information: The bot is unable to figure out the focus of the empty clue and crashes. Part of the log:

file:///…/hanabi-bot/src/conventions/h-group/hanabi-logic.js:65                         
                throw new Error('No focus found!');                                                    

I don't expect a fix, just wanted to inform people about it.

Is there a workaround to reconnect the bot to a game or otherwise to continue playing?

WillFlame14 commented 10 hours ago

The H-Group doesn't play with empty clues, so there's no conventional interpretation of such a clue. I guess I could just treat it as no interpretation other than eliminating some possibilities, if that's how it's normally played.

The bot can be asked to rejoin a game by sending it /rejoin in a private message, though its level will need to be reset first using /settings. More information on these commands are in the README. However, if the bot crashed due to some game event, then asking it to rejoin will just cause it to crash again.

In general, I would just avoid playing with variants/options that the bot doesn't support (i.e. anything other than the standard options in No Variant, Black, White, Rainbow, Prism, Pink or Brown), since it is prone to crashing or behaving strangely otherwise. I'll add this info to the README as well.