# Teaching

### Site Tools

spcs:summer2014:d10

Afternoon Teams: (Angel, Jove), (Andrew, Emily, Ed), (Mei-Ling, Clair), (Ellie, Alix), (Zuri, Anastasia), (Jeni, Float), (Penny, Raymond), (Fang, Will)

• Logic
• Game Theory
• Game Trees
• Game Studies

# Assignment

## Part 1: Blogging about software

Do you agree or disagree with Bill Gates?

## Part 2: Rock Paper Scissors AI

Today we talked about what is a game. The definition we used is: Ludus, Paida, and Narrative. We also talked about Game Trees and how computers think about games.

• In Processing make a Rock Paper Scissors game.
• First, draw out the finite state machine (FSM).
• Try to make the Game AI such that the computer always plays Scissors.
• Then make an AI where the computer plays random.
• Then make an AI where the computer tries to learn your patterns and beats you (out of 10).
• (Extra) Make your own sprites: http://www.piskelapp.com/
• (Extra COOL) Make it so that I can select which of the three AI's I'm playing (make a button for each AI).

Note: You can use buttons or keys to represent user input. The choice is yours. Use good design principles!

## Part 2: Tic Tac Toe AI

Same idea as before:

• Draw the FSM
• Player 1 is your user and always starts with X
• Player 2 is the computer
• First, make a game that just alternates between X and O when the user clicks
• Make sure it knows that three is a row is a win + (the other possible end state).
• On to the AI's, make the computer play the first open spot it finds
• Next, make another AI where the computer plays the random spot it finds
• Finally, make a computer that will always tie the game (perfect AI)
• (Extra COOL) Make it so that I can select which of the three AI's I'm playing (make a button for each AI).

## Stretch Assignments

You can go back to any previous project and work on them. No one had a chance to do the A* problem from Thursday yet.

You can also fork a classmates project or any other project you find interesting to tinker with.

Finally, if you are up for this challenge, try to make the game Black Jack (also known as 21), we will talk a bit about probabilities tomorrow.