1 / 5

Understanding Tree Recursion in Games: A Deep Dive into the Kinect Experience

In this lecture by Dan Garcia from UC Berkeley, we explore the intriguing world of tree recursion through engaging examples. Using Microsoft Kinect for Xbox 360 as a reference point, we demonstrate how body movement can control gaming experiences. We discuss a game scenario involving strategic number addition, aiming to reach a total of 10 while employing tree-based decision-making principles. Through this engaging approach, we analyze winning, losing, and tying scenarios, and demonstrate how to code solutions for evaluating game outcomes based on various positions. This lecture combines computing with real-world applications, offering insights into both recursion and game theory.

odelia
Télécharger la présentation

Understanding Tree Recursion in Games: A Deep Dive into the Kinect Experience

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS10The Beauty and Joy of ComputingLecture #25 : Tree Recursion 2010-11-29 UC Berkeley EECSLecturer SOEDan Garcia The newly released (and much-hyped) Microsoft Kinect system for the XBOX 360 used controller-free body motions to control games, music, and movies. Mskinect = body I/O xbox.com/kinect/

  2. For every position Assuming alternating play Value … (for player whose turn it is) Winning ( losing child) Losing (All children winning) Tieing (! losing child, but tieing child) Drawing (can’t force a win or be forced to lose) Remoteness How long before game ends? Review: What’s in a Strong Solution W L ... ... W W W L W W W W T D D ... ... W W W T W W W W

  3. Rules (on your turn): Running total = 0 Rules (on your turn): Add 1 or 2 to running total Goal Be the FIRST to get to 10 Example Ana: “2 to make it 2” Bob: “1 to make it 3” Ana: “2 to make it 5” Bob: “2 to make it 7”  photo Ana: “1 to make it 8” Bob: “2 to make it 10” I WIN! Review : Example: 1,2,…,10 7 ducks (out of 10)

  4. Let’s write code to determine value! • P = Position • M = Move • We only need 3 blocks to define a game • Do Move M on Position P •  a new Position • Generate Moves from Position P •  list of Moves • Primitive Value of Position P •  {win, lose, tie, undecided} • Let’s write Value of Position P • 0 = Win • 1 = Lose • 2 = Win • 3 = Win • 4 = Lose • 5 = Win • 6 = Win • 7 = Lose • 8 = Win • 9 = Win • 10 = Lose

  5. Answer

More Related