Remix Library / Games

Rock Paper Scissors AI

Play against a computer that learns your habits and tries to predict your next move.

Beginner Python
No account needed: you’ll start as a guest.
read-only · remix to edit
Output

What you'll learn

  • input() and while loops
  • Dictionaries
  • Lists as history
  • Simple prediction
  • Random choices

Challenges

Remix it, then try these. Each one is a bit harder than the last.

  1. Change it to first to 5 wins.
  2. Add lizard and Spock (look up the rules!).
  3. Show the percentage of times the computer guessed you right.
  4. Make the AI smarter: predict based on your last two moves, not just your favorite.
  5. Add a two-player mode on one keyboard.