1 / 11

Hex

Hex. Combinatorial Search in Game Strategy by Brandon Risberg. Menlo School. May 2006. Background. Where I got the idea: I first got the idea for “Hex” when we played it during an Algebra 2 class period with Mr. Squilante.

lilian
Télécharger la présentation

Hex

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. Hex Combinatorial Search in Game Strategy by Brandon Risberg Menlo School May 2006

  2. Background • Where I got the idea: • I first got the idea for “Hex” when we played it during an Algebra 2 class period with Mr. Squilante. • I got the idea to make an artificial intelligence for the game when I went to see the “Mastering the Game” exhibit about computer chess at the Computer History Museum.

  3. Introduction • “Hex” is a board game defined by the mathematician Piet Hein • It is a two player game played on a diagonal board.

  4. Rules • Both players trade off claiming “hexes” on the game board. • The goal is to create a chain of hexes from your side to your other side.

  5. Java Game Programming • Used nested “Swing” components and graphics. • Imported image files created in Photoshop. • Used multiple threads to handle animation. • Implemented a recursive method to detect a winning chain. • Added help files and windows for ease of use. • Created an opening splash dialog.

  6. A.I. Algorithms • Mini-Max • Generate a move tree. • Evaluate each position in tree. • Select best move at each level: • Minimize score on opponent move. • Maximize score on own move.

  7. Example Search Tree

  8. A.I. Algorithms (con’t) • Alpha – Beta pruning • Pruning branches of the search tree that will yield less favorable results. • Improves search speed; does not improve quality of moves. • Heuristics or “Rules of Thumb” • Guidelines that will help constrain the search.

  9. Examples of Heuristics • In real life: • Menlo registrar must assign students to class sections. • This is a complex search problem. • Heuristic: make the critical assignments first. • Senior English sections (workshops) cannot be interchanged, so begin with these. • Freshman English classes are interchangeable so do these last.

  10. Examples of Heuristics • In board games: • In chess, keeping your pieces in the center will usually be a stronger position. • “A knight on the rim is dim” • In Hex, a longer chain of connected hexes will usually be a stronger position. • This logic is typically built into the static evaluator.

  11. Care to try a game?

More Related