Tell us what’s happening:
Hello fellow players,
I’m seeking your valuable insights and suggestions to improve my performance in the game of Rock-Paper-Scissors.
I’m finding it challenging to achieve a minimum 60% win rate (especially with abbey and kris). I would greatly appreciate any advice you can share to help me improve my game. Thank you!
Your code so far
def player(prev_play, opponent_history=[]):
mapper = {"R": "P", "P": "S", "S": "R"}
return mapper.get(prev_play, prev_play)
The results so far:
Final results: {'p1': 399, 'p2': 0, 'tie': 600}
Player 1 win rate: 100.0%
Final results: {'p1': 494, 'p2': 487, 'tie': 18}
Player 1 win rate: 50.35677879714577%
Final results: {'p1': 500, 'p2': 499, 'tie': 0}
Player 1 win rate: 50.050050050050054%
Final results: {'p1': 841, 'p2': 158, 'tie': 0}
Player 1 win rate: 84.18418418418419%
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Challenge Information:
Machine Learning with Python Projects - Rock Paper Scissors