online-go / gtp2ogs

GTP Wrapper to allow bots to interface with the Online-Go.com Server
MIT License
88 stars 29 forks source link

collect user feedback from ingame chat (--loguserchat) #258

Open wonderingabout opened 4 years ago

wonderingabout commented 4 years ago

it would be helpful to auto collect user feedback from all game chats

most humans dont message bot admins or bot accounts privately so theres a low risk of spam also bot admin may miss the private messages or they could be lost from server

so we may want instead a way to fetch user messages from ingame chat, similarly to what was done in #216 then save all this text locally in a file (we can look at how --logfile implemented by @windo works: https://github.com/online-go/gtp2ogs/blob/devel/docs/OPTIONS-LIST.md#logfile)

instead of (message my admin or user X in case of errors), we could just do:

please write any feedback or request regarding this bot here, the bot admin will see it and may reply to you later

then we'd just need to find a way to filter out the pv and other bot-customized sendchats like kata-bot or the katrain bots have

it would be an option (not default) for example --loguserchat

(we may even add as an argument maximum allowed text length, for example --loguserchat 100, or we could hard code this max length limit but it would be less interesting i think)

anyways in all cases it would exclude all total game message strings that are longer than 100 words to auto filter pv, aichat, bot sendchat, and human spam

what do you think?

github-actions[bot] commented 1 year ago

This issue has been marked stale and will be closed soon without further activity. To keep the issue open, please respond to the comment to keep the discussion going.

Dorus commented 1 year ago

I still like this idea. Similar: Currently the bot auto-removes all notifications it doesn't understand (and i think also all those it does understand?) An option to ignore the "late chat received" notification instead of dismissing it, could be useful.

github-actions[bot] commented 7 months ago

This issue has been marked stale and will be closed soon without further activity. To keep the issue open, please respond to the comment to keep the discussion going.

windo commented 6 months ago

Ooh, I also like this idea a lot. I haven't touched gtp2ogs in a while, but it's on the top of my list of things to do if I should ever want to hack on it again.

Dorus commented 6 months ago

Related to this: I might have accidentally removed all 'old chat notifications' on bot accounts when i added logic that removed all ogs unknown messages on bot accounts.

Ah first quick step on this issue might be to make chat notifications known again and not discarded, or make this an option for bot owners that want to read chat msgs in games.

windo commented 5 months ago

I've been running this for a week and I see some messages duplicated. I guess I made some mistake with (or didn't understand something about) the message timestamps.

windo commented 5 months ago

And as for the chats themselves, looks like they are mostly:

  1. Variations of "hello" or "thanks for the game" (though ofc most people don't greet the bot)
  2. Being annoyed that the game is not going very well
  3. Asking for an undo
  4. Being surprised by the scoring

I think I'll plan to review the chats ~weekly or so for the next little while.

raylu commented 5 months ago

I've been running this for a week and I see some messages duplicated. I guess I made some mistake with (or didn't understand something about) the message timestamps.

maybe log in Game's ctor what it set startup_timestamp to?

windo commented 5 months ago

I added some logging and it appears like all the chat messages are replayed again when the game ends, I guess because you can't see chats from non-players during the game so the backend needs to send them at the end of the game, but chooses to also resend the messages from the players for simplicity?

So I think the Game needs to track when was the last chat it logged, and not log chats older than that... except for non-players? I really don't think I want to be tracking individual messages, but it also feels a bit complicated to do with just a horizon, especially if it's not clear what exactly to expect from the backend - like will the messages at least always be delivered in the right order?

I'll try to do something to fix this.