-
Notifications
You must be signed in to change notification settings - Fork 69
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
Implement Card Counting #268
Comments
When playerA steals from playerB, playerB should be the only player aware of that card in playerA's hand. playerC would know playerA's total hand, but would have to leave an unknown card in it's representation of playerA's hand. Giving AlphaBetaPlayer perfect knowledge would be an unfair advantage, so maybe each player needs their own card counting data to be updated. I'm just ramping up, but it sounds tricky to give this ability to the players, since they would need to listen into each action and avoid updating their knowledge in many different cases. Also, what if the UI tracked the known and unknown cards in the other players' hands on behalf of the player. That would be neat |
Shouldn't it be possible to moderate this through the |
@zarns I agree that perfect knowledge would be an unfair advantage. We shouldn't do that. I am also ok if by however we implement this, it is done with an "honor-system" (no real language/framework checks). Since these checks usually lower the speed at which games run, and our goal here is to research/find best Catan Player, so just being disciplined (since we can all review the open-source code) is good enough for me. If there's a nice way to add the checks / impossibility to know more than what players can, without impacting speed noticeably, then even better; I'll take it. @HassanJbara it might. But I'm not sure we want to add the responsibility to the For now, the best I see a
Indexing math might be off.. but you get the point! 👍 |
I can look into this after finishing the other issue, I don't see why it shouldn't be doable. One thing I don't quite understand, though, is the k parameter. Is the idea here that a player that remembers all cards drawn, even though that's technically not cheating, unfair? Or am I getting this wrong? |
This is a LOT of the post-second-move gameplay. You have an Attention to public actions i.e. draws/plays/trades (someone's K as a limit, above). You could model what your player 'believes the other player has' using K and a confidence score taking into account public plays since unknowns (steals) or the like, BUT are you trying to model human behavior or build a better bot? Give the bots ALL the observable actions. |
Keeping track of your enemies' cards is usually helpful. Implementing this could:
Would be cool to have this "card counting capability" be parametrized by a number
K
that represents how many cards from its enemy can a player keep "in its mind". I myself as a player, can probably just keep the last 2 - 3 cards of my enemies hands 😅 .There is a question whether to implement this as part of the Game, or as a capability in the Players. Intuitively, sounds like it should be the Player (since some may have the capabilities, but others not); but I am not sure how the API would like. Do we have to now feed every "tick" to every player(?) Do we make it so that the player has a pointer to the log of ticks/actions and knows how many it has "consumed", so that the next time it is its turn, he "updates" its card counting distribution/believe? In that later approach, we would have to make sure reading the log doesn't give the player more information than what he should have.
This sounds like could be developed as a fairly independent module (say
counter = CardCounter(k=5)
andcounter.update(...)
), that players may or may not use in their API.The text was updated successfully, but these errors were encountered: