https://github.com/yassineldeeb/estimation-bot
A bot for competing with estimation (cards game) π pro players and actually beat them πͺ
https://github.com/yassineldeeb/estimation-bot
bot card card-game cards game rust rustlang strategy
Last synced: 11 months ago
JSON representation
A bot for competing with estimation (cards game) π pro players and actually beat them πͺ
- Host: GitHub
- URL: https://github.com/yassineldeeb/estimation-bot
- Owner: YassinEldeeb
- Created: 2021-12-06T22:42:27.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-18T19:35:24.000Z (over 4 years ago)
- Last Synced: 2024-10-19T10:04:39.097Z (over 1 year ago)
- Topics: bot, card, card-game, cards, game, rust, rustlang, strategy
- Language: Rust
- Homepage:
- Size: 3.25 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Estimation bot π€
## What's estimation?
The card game Estimation is a trick-taking game where you score points by correctly predicting the amount of tricks you will take each round.
>π It's a strategy based game that requires a lot of thinking, practising and a bit of luck π
## What'll this bot do?
Try beating estimation pro players without machine learning using some maths formulas!
>oh god what have I gotten myself into π€¦ββοΈ
# Game Explanation π¨βπ«
## Objective π€
Score the most points by correctly predicting how many tricks youβll take each round.
## Trick π?
A trick is created by each player playing a card into
the middle.
The winner of the trick is the player with the highest
raking card.

## Card Rank πͺ
The Cards are ranked with βAceβ being the Highest and βtwoβ being the Lowest untill a trump suit is established.

The trump suited card will outrank all other suited cards.
for example: if βclubsβ are trump, then the 9 of clubs will outrank the βAceβ of hearts

## Deal π€
Before the game starts, the first dealer needs to be established.
Thisβs done by each player picking a card and the person with the highest ranking card is the first dealer.

## Bidding π²
After the cards are dealt but before the gameplay
starts, each player will bid on how many tricks,
he think heβll win.
Bidding will start with the player on the left of the
dealer and continue around clockwise.
There's also bidding on what the "Trump Suit" will be and the player with the highest trump suit ranking is the one who decides what is the "Trump Suit" for the round.
>π Trump Suit Ranking: Spades -> Heart -> Diamonds -> Clubs
One player will need to be designated as the score
keeper and have a scorecard ready before the
bidding starts.
As players bid the score keeper will write down the
stated bid for each player.
The total number of tricks bid canβt be equal to the total
number of tricks possible, so this game is played using the [Standard 52-card deck](https://en.wikipedia.org/wiki/Standard_52-card_deck)

which means that this table can clarify the maximum number of tricks bid that's possible based on the number of the players.

This makes it that at least one player goes negative each round cause if you multiplied the players count with the Card Amount you'll always get a number that's less than 52(number of the cards).
## Game Play π
## π I think the video format will be better for understanding the gamplay instead of reading, check [this video](https://youtu.be/aqmiD5RTBkI?t=171)
The player left of the dealer plays the first card into
the middle.
Each player must follow the lead suit when possible.
Trump cards canβt be used unless the player donβt
have the lead suit.
If a player is unable to follow the lead, that player
can play any card but the card heβll place will have
the least rank of all cards unless it was a trump suit π
The winner of the trick is the player who played the
highest card in the lead suit unless a Trump suited
card was played, if Trump is involved the player with
the highest ranking trump card would win the trick.
The winner of the trick leads the next trick.
## Keeping Score π―
10 Points are added to each playerβs bid every round
If a player correctly predicts the amount of tricks he
won the player is awarded his bid + 10 to his score.
If a player incorrectly guessed the amount of tricks
he won the player is given the negative amount of
his (bid + ten points) to his score.

## Strategy π€
The standard card deck has 52 cards
- 13 of each unit π
- Clubs, Diamonds, Hearts, and Spades
1- so the first strategy that the bot will use to defeat my dad is to keep track of what cards that was played and what is still in player's hands so that the bot can decide:
- approximately the number of tricks he'll bid on
- wether a particular time is good or not to play a high ranking card based on the cards with the players.

2- still thinking...
# Credits
- This [YouTube Tutorial](https://www.youtube.com/watch?v=aqmiD5RTBkI)
- This [wiki](https://en.wikipedia.org/wiki/Standard_52-card_deck)