- Adeline Greene @AdelineG218
- Anish Goyal @anishgoyal1108
Camel Up is a lively and engaging game where two players bet on camels racing around a track. We've brought the fun of Camel Up to Python, allowing you to experience the excitement of the race right from your terminal! 🎲
To start the game, simply clone this repo and run python main.py. From the main menu, select "Start New Game" and enter the names of both players.
Our implementation of Camel Up is structured with several key classes that are each defined in their own separate Python modules:
- Player: Represents a player in the game, handling individual actions like placing bets or rolling dice.
- GameManager: Manages the overall state and rules of the game, coordinating between players and ensuring the game runs smoothly.
- MainMenu: Displays the main menu and handles user choices, such as starting a new game or exiting.
- PlayGame: Manages the gameplay, including displaying the game state and processing player actions during the game.
- EVBot: A strategic assistant that provides hints for betting on each camel.
MainMenuinteracts withGameManagerto start the game when a new game is selected.GameManagerinteracts withPlayerto manage player-specific actions and details. It also provides game state details toPlayGamefor display and interaction.PlayGamecommunicates withGameManagerto execute game actions such as moving camels, updating scores, and switching turns. It also engages withEVBotto provide strategic hints to players during the game.
In our Pythonic version of Camel Up, we've added a strategic twist by incorporating Expected Value (EV) calculations within the EVBot class. By running Monte Carlo simulations, we can determine the probability of each camel winning or placing second. Players can pay one coin to get a hint on the best camel to bet on based on these probabilities!
- Simulate moving each camel across possible board states for a set of dice rolls and orders.
- Determine the winner and runner-up camels from the simulated board states with
find_simulated_winner. - Keep track of the number of times each camel wins and finishes second across all simulations.
- Compute the EV for each camel based on win and runner-up probabilities, along with the value of the bet if the camel is in the game.
- Identify the camel with the highest EV and generate a recommendation for which camel to bet on (or if rolling is preferable to begin with).
Feel free to explore the code and enjoy the thrill of Camel Up in Python with your friends! Thank you to Jane Street Group, LLC. for giving us the opportunity to make this project!
/pic2031446.png)

