Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hex A game of connections. The Beginning Invented independently by Piet Hein in 1942 and John Nash in 1948. Invented independently by Piet Hein in 1942.

Similar presentations


Presentation on theme: "Hex A game of connections. The Beginning Invented independently by Piet Hein in 1942 and John Nash in 1948. Invented independently by Piet Hein in 1942."— Presentation transcript:

1 Hex A game of connections

2 The Beginning Invented independently by Piet Hein in 1942 and John Nash in 1948. Invented independently by Piet Hein in 1942 and John Nash in 1948. Played on a grid of hexagons. Standard size for tournaments is 11x11 or 14x14. Played on a grid of hexagons. Standard size for tournaments is 11x11 or 14x14. Object of the game is to make a continuous chain of your colour to connect your sides of the board. Object of the game is to make a continuous chain of your colour to connect your sides of the board. Simple Rules Simple Rules –Play anywhere: Very wide game tree –Swap Rule: Helps balance the game Early Game Proofs Early Game Proofs –First Player Win –No Ties

3 The Board

4 Virtual Connections What is a virtual connection? What is a virtual connection? –Subgame: goal is to connect two board positions, not necessarily the edges. –A guarantee that for a given subgame, even if the opponent plays first, you can still win the subgame. –An edge to edge virtual connection for a player means they win!

5 Basic Virtual Connections Simplest Basic Virtual Connection is the “two bridge” Simplest Basic Virtual Connection is the “two bridge” –The two blue pieces here form a two bridge, and the lower piece forms a two bridge with the edge. In diagrams, we represent virtual connections by colouring all the pieces required to maintain the connection. In diagrams, we represent virtual connections by colouring all the pieces required to maintain the connection.

6 Edge Connection Templates A good example of more complex virtual connections are edge templates. A good example of more complex virtual connections are edge templates. These templates are virtual connections from the edge to a piece on the board. These templates are virtual connections from the edge to a piece on the board. The farther out the piece, the more pieces that are needed to connect it to the edge. The farther out the piece, the more pieces that are needed to connect it to the edge. Very useful to know for learning how to play Hex better! Very useful to know for learning how to play Hex better! 4 out connections  3 out connections 2 out connection

7 Almost Virtual Connections A subgame in which if we get one free move, we play one piece to create a new full connection. A subgame in which if we get one free move, we play one piece to create a new full connection. The piece that creates the full connection is called the key of the almost connection. The piece that creates the full connection is called the key of the almost connection. In our diagrams, a blue key is coloured cyan and a red key is coloured magenta. In our diagrams, a blue key is coloured cyan and a red key is coloured magenta.

8 Complex Virtual Connections The advantage to virtual connections is the number of pieces required to win a game on any board is much smaller. The advantage to virtual connections is the number of pieces required to win a game on any board is much smaller. Sometimes, you can win with only a handful of pieces on the board! Sometimes, you can win with only a handful of pieces on the board! Consider this board position. Blue responds to Red’s rather poor follow- up move … Consider this board position. Blue responds to Red’s rather poor follow- up move …

9 And Blue wins, because he already has a full connection from edge to edge! And Blue wins, because he already has a full connection from edge to edge!

10 Discovering Virtual Connections

11 Recursive Virtual Connections By applying three rules, we can find some virtual connections By applying three rules, we can find some virtual connections The connections found are a subset of all connections, but they are still very useful The connections found are a subset of all connections, but they are still very useful These rules were formalized in two papers written by Vadim Anshelevich These rules were formalized in two papers written by Vadim Anshelevich As each connection is discovered, it is added to a data structure for use by later rules As each connection is discovered, it is added to a data structure for use by later rules Every two adjacent positions have a trivial connection joining them Every two adjacent positions have a trivial connection joining them

12 The And Rule Assume we have Assume we have –Connection from A-B –Connection from B-C –B is our colour –A-B and B-C do not intersect Then the union of A-B and B-C is a connection from A-C Then the union of A-B and B-C is a connection from A-C

13 The And Rule – Empty Intersection The two connections must have an empty intersection The two connections must have an empty intersection If they do not, one opponent move can challenge both components If they do not, one opponent move can challenge both components

14 The Almost Rule Assume we have Assume we have –Connection from A-B –Connection from B-C –B is empty –A-B and B-C do not intersect Then the union of A- B, B-C, and B is an almost connection from A-C Then the union of A- B, B-C, and B is an almost connection from A-C

15 The Or Rule Assume we have Assume we have –At least two Almost connections from A-B –A subset of these connections has an empty intersection Then, the union of this subset is a connection from A-B Then, the union of this subset is a connection from A-B

16 The Or Rule - continued

17 Recursive Virtual Connections ALMOST Connections AND Connections OR Connections Trivial Connections When no new connections are found, we are done.

18 Applications of Virtual Connection Information We know of three good uses for virtual connection information We know of three good uses for virtual connection information –Proving a win for a player –Evaluation Function –Limiting the search tree

19 Proving a win for a player If a player has an edge- to-edge connection, they have a guaranteed win. If a player has an edge- to-edge connection, they have a guaranteed win.

20 Evaluation Function In 1953, Claude Shannon and E.F. Moore made a Hex-playing machine, based on electrical resistances In 1953, Claude Shannon and E.F. Moore made a Hex-playing machine, based on electrical resistances Vadim Anshelevich describes a method of using electrical resistances in his Hex papers. Vadim Anshelevich describes a method of using electrical resistances in his Hex papers.

21 Evaluation Function Each virtual connection is a wire between two positions, with a resistance based on the size of the connection, and the state of the endpoints. Each virtual connection is a wire between two positions, with a resistance based on the size of the connection, and the state of the endpoints. A voltage is applied to the edges. The resulting current that passes through the system is the value of the evaluation function. A voltage is applied to the edges. The resulting current that passes through the system is the value of the evaluation function.

22 Limiting the search tree On smaller boards (7x7 and less) one or both players will often have almost connections joining edge to edge within the first few moves On smaller boards (7x7 and less) one or both players will often have almost connections joining edge to edge within the first few moves If the opponent does not play within this connection, then the player can play the ‘key’ of the almost connection, forming a full connection. If the opponent does not play within this connection, then the player can play the ‘key’ of the almost connection, forming a full connection.

23 Limiting the search tree

24 Mustplay Regions If a player has multiple almost edge-edge connections, then their opponent must play a move that disrupts all such connections. If a player has multiple almost edge-edge connections, then their opponent must play a move that disrupts all such connections. The opponent must then play a move in the intersection of all of the player’s almost edge-edge connections. The opponent must then play a move in the intersection of all of the player’s almost edge-edge connections.

25 Mustplay Region for D5

26 Mustplay Regions Since a player is forced to play in their mustplay region, we can eliminate parts of the search tree. Since a player is forced to play in their mustplay region, we can eliminate parts of the search tree. On smaller boards (7x7 and lower) most lines of play have mustplay regions within the first few moves On smaller boards (7x7 and lower) most lines of play have mustplay regions within the first few moves On larger boards, mustplay regions will only develop in the midgame. On larger boards, mustplay regions will only develop in the midgame.


Download ppt "Hex A game of connections. The Beginning Invented independently by Piet Hein in 1942 and John Nash in 1948. Invented independently by Piet Hein in 1942."

Similar presentations


Ads by Google