Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markovified Black Cards #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

SharaaEsper
Copy link

This is the feature I was working on for my own personal bot, I cleaned up the code a little bit but it's still a kinda messy. I know you were talking about making a daily deck on a scheduler, but you also talked about switching to Postgres which would eliminate the main downside of this method (Hammering the SQLite DB).

Either way, includes the code to add a markov expansion via dah.add markov. Does have the downside of it adding any current markov expansions in other running games if a new session is added via dah.add all (past games cards are cleared out of the DB on dah.end)

Also includes the fix for new installs when the games DB is empty, and a script to generate the corpus from existing expansions present in dah/dah-cards.

@z64
Copy link
Owner

z64 commented Feb 8, 2017

Thanks again for this cool idea! I hope to have time to review this and make some kind of implementation of it soon.

I know you were talking about making a daily deck on a scheduler, but you also talked about switching to Postgres which would eliminate the main downside of this method (Hammering the SQLite DB).

While true, I think even then I would stick with a daily build task (at the very least in my instance)

Looking at my bots statistics since launch, most people only play one or two games at most in a given day. Generating a large enough deck to cover approximately 10 players, it is unlikely they would ever in fact see all the cards - not to mention, they must add other expansions to their game since this is only black cards. So the next time they play (on another day) it would be an all new markov deck, therefore ; I'd rather serve them a cached daily deck instantly rather than have any theoretically any delay at all. I think the bot will scale better using this thinking, combined with using a Postgres adapter.

Anyway - I'd probably accept this as-is and refactor it later. :)

Another thought - did you happen to look into generating white cards? After seeing the results of this function, I'm curious. 😉

@z64 z64 added the enhancement label Feb 8, 2017
@z64 z64 self-requested a review February 8, 2017 16:41
@SharaaEsper
Copy link
Author

I did try it with white cards, but the results aren't very good. Likely because it's harder to try and parse a question that sometimes has no blanks, but sometimes does. Here's a 50 line sample of that output:

https://gist.github.com/Ryuujinx/fd927f4d19882efd67f270971e763b39

@z64
Copy link
Owner

z64 commented Feb 8, 2017

Interesting! Thanks for sharing. I see what you mean. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants