hex

Information about hex

Published on September 18, 2007

Author: FunSchool

Source: authorstream.com

Content

On optimal Play in the Game of Hex:  On optimal Play in the Game of Hex By Chris Senkler and Frank Bergmann Topics:  Topics Short Reminder: What is Hex? History of Hex Optimal Play in the Game of Hex An Automatic Theorem Proving Approach to Game Programming What is Hex?:  What is Hex? Rules The game starts with an empty board of hexagonal tiles. Each player 'owns' 2 opposite sides of the board. Players alternate turns placing pieces on the tiles, one player taking white pieces and the other taking black. The first player to create a string to touching tiles of their color connecting their two sides wins. It is also known that the Game of Hex cannot end in a draw. Nash proved in 1949 that player I always has a winning strategy for symmetric boards. History Of Hex:  History Of Hex The game was first presented in 1959 in Scientific American. Invented in 1942 by Piet Hein. Independently rediscovered by Nash in 1948. Important to Mathematics mostly because of it’s relation to the Brower Fixed Point Theorem. Optimal Play in the Game of Hex:  Optimal Play in the Game of Hex Introduction:  Introduction This part of the presentation will concentrate on two points: What is the shortest path with which player one can guarantee a win? What is the minimal number of moves player one must make to guarantee a win? The Shortest Path:  The Shortest Path Let Hex(n,l) be a Hex game of size n with the added constrain that player one wins only by constructing a path of length less then or equal to l. In such a game a draw is possible. Define λ(n) = min { l | player I has a winning strategy for Hex(n,l) } Instead of determining λ(n) exactly, determine a lower bound for λ(n). Lower bound for λ(n):  Lower bound for λ(n) If λ(n) andgt; n, then λ(n+1) andgt; n+1 Inductive proof: All Hex(n+1,n+1) winning paths for player one must either: Contain a Hex(n,n) winning path for player one through the standard n x n sub-board or Contain both [1,n] and [1,(n+1)] Assume that λ(n) andgt; n, this means that player two can prevent a winning Hex(n,n) path for player one on the n x n sub-board. Whenever I plays on the n x n sub-board II follows his strategy, otherwise he can play on [1,n] or [1,(n+1)].  Player I cant have a winning path in Hex(n+1,n+1) For the initial case consider: λ(4) andgt; 4 Proving λ(4) > 4Categories:  Proving λ(4) andgt; 4 Categories There are up to symmetry four categories of distinct first moves. In order to show λ(4) andgt; 4 each opening move will be considered along with continuing paths. Proving λ(4) > 4Category I:  Proving λ(4) andgt; 4 Category I Blue cannot prevent a connection between the top red edge and the bottom red edge  blue cannot win Hex(4,4) with an opening move from category I Player I = Blue Player II = Red Proving λ(4) > 4Category II:  Proving λ(4) andgt; 4 Category II If blue begins with an opening move in category II, red immediately occupies the corner point and thus eliminated the possibility of any winning path of length 4.  blue cannot win Hex(4,4) with an opening move from category II Player I = Blue Player II = Red Proving λ(4) > 4Category III:  Proving λ(4) andgt; 4 Category III Blue cannot prevent a connection between the top red edge  blue cannot win Hex(4,4) with an opening move from category III Player I = Blue Player II = Red Proving λ(4) > 4Category III:  Proving λ(4) andgt; 4 Category III Blue cannot prevent a connection between the top red edge and the bottom red edge  blue cannot win Hex(4,4) with an opening move from category III Player I = Blue Player II = Red Proving λ(4) > 4Category IV:  Proving λ(4) andgt; 4 Category IV Blue cannot reach the opposite border with a path of length 4  blue cannot win Hex(4,4) with an opening move from category IV  There exists no opening move that allows player one to construct a winning path with length 4 or less. Player I = Blue Player II = Red Minimal number of Counters:  Minimal number of Counters Let Hexd(n) be the game of Hex(n) with the added constraint that player one must win by playing at most d counters. Define: δ(n) = min { d | player one can guarantee a win at Hexd(n) } Again only a lower bound will be established. (A trivial lower bound would be δ(n) ≥ λ(n)) Lower bound for δ(n):  Lower bound for δ(n) δ(n) ≥ n + n/4 Proof: Divide the n x n board into nx4 sub-boards Hk and one n x (n-4n/4 ) sub-board H. In order to win Hex(n) player one must have a winning path across H and each Hk. Player one can complete a path across H with (n-4n/4 ) counters but for each k, player one needs at least 5 counters.  Player one needs at least: 5n/4 + (n-4n/4 ) = n + n/4 counters to complete a winning path in Hex(n) Summary:  Summary A lower bound for the shortest path length and the minimal number of counters could be established for Hex games of size n: Shortest path length: λ(n) andgt; n for all n ≥ 4 Minimal number of counters: δ(n) ≥ n + n/4 The Game of Hex:  The Game of Hex An Automatic Theorem Proving Approach to Game Programming Connections:  Connections Two pieces are connected if they are of the same color and share an edge. These 2 white pieces are 'connected'. The black pieces are not. Virtual Connections:  Virtual Connections These two white pieces are 'virtually connected' because even if it is black’s turn White can connect. If black A, white B, and visa versa A B The Problem:  The Problem Computers evaluate a game tree, which is hard for a game like chess, where there are an average of about 40 legal moves from a given game position. Hex has an average of over 100 on most sizes of board, which makes a complete analysis impossible. Without a concrete way of evaluating a position, a computer has to play out every branch to the end before knowing if it was a good move or not. Common Virtual Connections:  Common Virtual Connections 'Two Bridge' connects 2 stones 'Edge Connection' from fourth row Ladder connection:  Ladder connection Connects either stone to the bottom edge. Why Virtual connections are Good:  Why Virtual connections are Good The computer can reduce the game tree because it no longer has to consider moves at the X points, because the responses to these are wrote. X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Circuits:  Circuits In order to solve the other problem mentioned earlier we need a concrete way to evaluate game positions in which one player has not yet won. To do this we put the game in terms of something that the computer can understand. We equate it to electrical resistance in a circuit. We apply opposite charges to the sides of the board. We Evaluate the position for Black first, and then for white. For black We assign the value rb(c)=1 if c is empty, rb(c)=0 if c has a black piece, and rb(c)=+infinity if c is occupied by a white piece. For each pair of neighboring cells we associate the electrical link with the resistance rb(c1,c2)=rb(c1)+rb(c2). Virtual Connections are treated as having resistance 0 if they are yours, and infinity if they belong to the other player.:  We apply opposite charges to the sides of the board. We Evaluate the position for Black first, and then for white. For black We assign the value rb(c)=1 if c is empty, rb(c)=0 if c has a black piece, and rb(c)=+infinity if c is occupied by a white piece. For each pair of neighboring cells we associate the electrical link with the resistance rb(c1,c2)=rb(c1)+rb(c2). Virtual Connections are treated as having resistance 0 if they are yours, and infinity if they belong to the other player. X Y We repeat this operation for white, using similar algorithms. The overall position is now given by the formula E=Rb/Rw. If E ever reaches 0, black has a clear path to victory, and if E ever goes to infinity white has a clear path to victory. :  We repeat this operation for white, using similar algorithms. The overall position is now given by the formula E=Rb/Rw. If E ever reaches 0, black has a clear path to victory, and if E ever goes to infinity white has a clear path to victory. X Y Using this algorithm, the computer can::  Using this algorithm, the computer can: Evaluate the current game position Evaluate the relative value of different moves Stop an evaluation of a branch of the game tree once the equation E reaches 0 or infinity. Summary:  Summary In order to make it possible for a computer to play 'intelligently' in hex it is necessary to reduce the branches of the game tree that are analyzed and to evaluate the position of a game even if one player has not yet won. This can be done by the use of 'virtual connections' and by treating the board as an electrical circuit whose positional value is measured as the electrical resistance. References:  References [1] Garikai Campbell, on optimal play in the game of Hex, INTEGERS: Electronic Journal of Combinatorial Number Theory, vol. 4, G2, 2004 [2] Vadim V. Anshelevich, The Game of Hex: An Automatic Theorem Proving Approach to Game Programming, Proceedings of the Seventeenth National Conference on Artificial Intelligence (AAAI-2000), pp.189-194, 2000

Related presentations


Other presentations created by FunSchool

Got Discipline PowerPoint
18. 06. 2007
0 views

Got Discipline PowerPoint

InterAccess
30. 04. 2008
0 views

InterAccess

lockin1
28. 04. 2008
0 views

lockin1

IIEF MCX
22. 04. 2008
0 views

IIEF MCX

MapAccNov01
18. 04. 2008
0 views

MapAccNov01

ICW Presentation
17. 04. 2008
0 views

ICW Presentation

Lecture 9 Macro model
16. 04. 2008
0 views

Lecture 9 Macro model

ATE12
14. 04. 2008
0 views

ATE12

TeAM NEF ESF Report
13. 04. 2008
0 views

TeAM NEF ESF Report

SAEA06Robinson
10. 04. 2008
0 views

SAEA06Robinson

Larose
09. 04. 2008
0 views

Larose

dairybreeds
19. 10. 2007
0 views

dairybreeds

infocom2001sfb
18. 09. 2007
0 views

infocom2001sfb

2003 Student Info System IBM
18. 09. 2007
0 views

2003 Student Info System IBM

vfpweb
18. 09. 2007
0 views

vfpweb

Fine Art and Literature
13. 10. 2007
0 views

Fine Art and Literature

cell3
15. 10. 2007
0 views

cell3

opel
19. 10. 2007
0 views

opel

horrocks
23. 10. 2007
0 views

horrocks

yang45
15. 10. 2007
0 views

yang45

GGFpart2
28. 11. 2007
0 views

GGFpart2

Sunken backbone game
10. 10. 2007
0 views

Sunken backbone game

BrandtPadua
16. 10. 2007
0 views

BrandtPadua

Lectures4 5 Ch2
07. 11. 2007
0 views

Lectures4 5 Ch2

vugia emerging
23. 10. 2007
0 views

vugia emerging

1a co clustering
19. 11. 2007
0 views

1a co clustering

mobopts 5
01. 12. 2007
0 views

mobopts 5

majoranastatus
10. 12. 2007
0 views

majoranastatus

Northern Renaissance Art
14. 12. 2007
0 views

Northern Renaissance Art

world Hunger
13. 08. 2007
0 views

world Hunger

unconscious Origins
13. 08. 2007
0 views

unconscious Origins

Vending Ala Carte
13. 08. 2007
0 views

Vending Ala Carte

weaning mice
13. 08. 2007
0 views

weaning mice

Xiushi Yang
13. 08. 2007
0 views

Xiushi Yang

LarsonWelcome
16. 10. 2007
0 views

LarsonWelcome

Ken stellar halo
15. 11. 2007
0 views

Ken stellar halo

African Union 2050
23. 12. 2007
0 views

African Union 2050

frfin
12. 10. 2007
0 views

frfin

Bhutan Hunger presentation RCC
04. 01. 2008
0 views

Bhutan Hunger presentation RCC

10 31 05 chaps 15 16
02. 11. 2007
0 views

10 31 05 chaps 15 16

HAtrash
15. 10. 2007
0 views

HAtrash

gti pmgti
24. 10. 2007
0 views

gti pmgti

Uniform Wear
18. 09. 2007
0 views

Uniform Wear

Lsn 6 Maya and Inca
20. 11. 2007
0 views

Lsn 6 Maya and Inca

monster
21. 11. 2007
0 views

monster

campusmap
28. 12. 2007
0 views

campusmap

wolson presentation
17. 10. 2007
0 views

wolson presentation

thurston
09. 10. 2007
0 views

thurston

compfpm flood plain functions
03. 01. 2008
0 views

compfpm flood plain functions

jeff kephart 11 03
18. 09. 2007
0 views

jeff kephart 11 03

LACEApresJZ1
26. 10. 2007
0 views

LACEApresJZ1

Wedding PP Presntation attach
27. 11. 2007
0 views

Wedding PP Presntation attach

RHCh1
20. 02. 2008
0 views

RHCh1

MATERIAL HANDLING PREVIEW
26. 02. 2008
0 views

MATERIAL HANDLING PREVIEW

unaids
13. 08. 2007
0 views

unaids

tgs04b
18. 09. 2007
0 views

tgs04b

about
28. 09. 2007
0 views

about

CPPStudyPhysicalProt ection
19. 11. 2007
0 views

CPPStudyPhysicalProt ection

nliwiSCS
12. 10. 2007
0 views

nliwiSCS

TurfBMP81704
14. 02. 2008
0 views

TurfBMP81704

CAlbala
22. 10. 2007
0 views

CAlbala

LT SLIDE show
11. 03. 2008
0 views

LT SLIDE show

marie curie jenam june 2005
13. 03. 2008
0 views

marie curie jenam june 2005

volcanoes group5
25. 03. 2008
0 views

volcanoes group5

gusev
15. 10. 2007
0 views

gusev

Parent Presentation predators
01. 01. 2008
0 views

Parent Presentation predators

Williams Tanzania
13. 08. 2007
0 views

Williams Tanzania

PrelimI
07. 10. 2007
0 views

PrelimI

personalities
12. 10. 2007
0 views

personalities

MeetingFreightDataCh allenges
28. 02. 2008
0 views

MeetingFreightDataCh allenges

04 19 SW
29. 10. 2007
0 views

04 19 SW

APP The American Experience WK3
17. 12. 2007
0 views

APP The American Experience WK3

062507
04. 03. 2008
0 views

062507

wedekind
08. 10. 2007
0 views

wedekind

IZMO CONCIERGE
30. 10. 2007
0 views

IZMO CONCIERGE

eh wellseptic
07. 11. 2007
0 views

eh wellseptic

20070114 sanog9 apnic update
27. 03. 2008
0 views

20070114 sanog9 apnic update

ATCNewswireCatalogue EN Q207
02. 10. 2007
0 views

ATCNewswireCatalogue EN Q207

db pres okutani whois
09. 10. 2007
0 views

db pres okutani whois

hotchips 2004 motes
18. 06. 2007
0 views

hotchips 2004 motes

gww sid july27
18. 06. 2007
0 views

gww sid july27

eolson AUV2004
18. 06. 2007
0 views

eolson AUV2004

EMS Stake holders
18. 06. 2007
0 views

EMS Stake holders

edinburgh condor tutorial
18. 06. 2007
0 views

edinburgh condor tutorial

dztalk 3
18. 06. 2007
0 views

dztalk 3

dw olap
18. 06. 2007
0 views

dw olap

Digital Photos Hitchcock
18. 06. 2007
0 views

Digital Photos Hitchcock

DGov transform wo notes web
18. 06. 2007
0 views

DGov transform wo notes web

defense
18. 06. 2007
0 views

defense

palais 04
18. 09. 2007
0 views

palais 04

chop06
29. 10. 2007
0 views

chop06

MISR images Aug2001
21. 10. 2007
0 views

MISR images Aug2001

PresentacionGobCorp2 003
22. 10. 2007
0 views

PresentacionGobCorp2 003

cmc2q06
18. 09. 2007
0 views

cmc2q06

AfricanAmericans A Z
03. 10. 2007
0 views

AfricanAmericans A Z

Proper KeyBoarding Technique
15. 06. 2007
0 views

Proper KeyBoarding Technique

Dinosaurs
15. 06. 2007
0 views

Dinosaurs

Memories
15. 06. 2007
0 views

Memories

Like - Having Different Hobbies
15. 06. 2007
0 views

Like - Having Different Hobbies

humanity
15. 06. 2007
0 views

humanity

Volcanoes are Hot Stuff
15. 06. 2007
0 views

Volcanoes are Hot Stuff

China2005NoAnimation
23. 10. 2007
0 views

China2005NoAnimation

BTL Statistics2005
18. 09. 2007
0 views

BTL Statistics2005

Dillon
18. 06. 2007
0 views

Dillon

infovis03 talk slides
18. 09. 2007
0 views

infovis03 talk slides

Block 6 Basler Ausschuss
16. 10. 2007
0 views

Block 6 Basler Ausschuss

scarlett 28oct05
18. 09. 2007
0 views

scarlett 28oct05

barrier
18. 09. 2007
0 views

barrier

SNIMA BTP
24. 10. 2007
0 views

SNIMA BTP

familyweek3
24. 02. 2008
0 views

familyweek3

rutkowska bheurope2006
18. 09. 2007
0 views

rutkowska bheurope2006

ATA2007 US MA MReyna
23. 10. 2007
0 views

ATA2007 US MA MReyna

P Jonson AIC
18. 10. 2007
0 views

P Jonson AIC

Denver 05b
18. 06. 2007
0 views

Denver 05b

6 WP4 TRT
20. 03. 2008
0 views

6 WP4 TRT

Enigma1
31. 12. 2007
0 views

Enigma1

P416 Lec5 S07
27. 09. 2007
0 views

P416 Lec5 S07

mulligan
18. 09. 2007
0 views

mulligan