聯系方式

您當前位置:首頁 >> Algorithm 算法作業Algorithm 算法作業

日期:2019-06-15 11:15

The University of Melbourne

School of Computing and Information Systems

COMP30024 Artificial Intelligence

Rules for the Game of

Chexers

Last updated March 11, 2019

Chexers is a three-player hexagonal turn-based race game. Test the loyalty of your band of twofaced

checkerpieces as you charge them through a twisting and treacherous battleground. Will all your

pieces stay true to your cause? Can you earn yourself some new followers in the chaos? To win this

tumultuous chase, you must double-cross and triple-cross your way across the finish line before your

opponents—three, two, one... go!

Setup

Chexers plays on a hexagonal board of 37 hexes, as illustrated in Figure 1. Three players (Red, Green, and

Blue) play the game. Each player initially controls 4 pieces of their colour. The pieces begin in the configuration

shown below in Figure 1, occupying hexes along three edges of the board.

Figure 1: Board with 37 hexes and starting configuration of 12 pieces: 4 Red (R), 4 Green (G), 4 Blue (B).

1

Gameplay

Players take turns, starting with Red, followed by Green, followed by Blue. This cycle repeats until the game

ends. On each turn, the current player must take a single action involving a piece in their colour, if possible. This

action may be a move action, a jump action, or an exit action. If no such actions are possible the player must

pass instead, taking no action. Note that a player can only pass if they have no available actions (for example if

the player has no remaining pieces or their remaining pieces are ‘blocked’ by other pieces). Each type of action is

described in the following sections.

Move actions

A move action (a ‘move’) involves moving a piece from the hex it currently occupies to an adjacent hex (one of

the at-most-six hexes in direct contact with the current hex on the board). For the move action to take place, the

adjacent hex must not be occupied by another piece. A configuration illustrating available move actions is shown

in Figure 2a.

Jump actions

A jump action (a ‘jump’) involves moving a piece from its current hex to an unoccupied hex opposite some

occupied adjacent hex. That is, a piece ‘jumps over’ an adjacent piece onto the hex directly on the other side from

where it started. Figure 2b explores an example configuration to illustrate these concepts.

The adjacent piece (the one to be ‘jumped over’) may have any colour. If this piece is a different colour from

the jumping piece, then it will be converted—its colour will change to the colour of the jumping piece as a result

of the jump action. In this way, jump actions enable a player to ‘gain control’ of additional pieces.

(a) Move actions: In this configuration,

the piece R1 has an available move action

to each of the hexes marked a, b, c and d.

Though the hexes occupied by G and R2 are

also adjacent, moves to these hexes are not

available since they are occupied. G is on a

hex near an edge of the board and has only

4 adjacent hexes to begin with; since 2 of

them are occupied (by B and R1), G can

only move to hex a or hex d.

(b) Jump actions: In this configuration, G1 has a jump action available

over G2 to the horizontally opposite hex marked b. G1 cannot jump over

R because the hex opposite R is occupied (by B). Note that G1 cannot

jump all the way to the hex marked d either: a jumping piece may only go

over a single hex. G2 can jump over R because the opposite hex from G2’s

perspective, e, is unoccupied (this jump action will result in the conversion

of R to a Green piece). G2 cannot jump over G1 because there is no hex

opposite G1 from G2’s perspective (such a hex would have to be at the

position marked x). Note further that ‘jump sequences’ are not allowed:

G2 cannot jump over R to e and then over B to c in one action, for example.

Figure 2: These partial board configurations exemplify the rules for move actions and jump actions.

Exit actions

An exit action (an ‘exit’) involves a piece ‘leaving the board’. These actions are only possible when a piece occupies

some hex on the edge of the board directly opposite the edge where the controlling player’s pieces started the game

(as per Figure 1). The exiting piece is removed from the board (leaving its hex unoccupied). Figure 3 outlines the

hexes that allow exit actions for each player, and shows some examples of available exit actions.

(a) This figure marks the hexes where Red’s

pieces have available exit actions with r,

Green’s with g and Blue’s with b. Each

marked hex is on the opposite edge of the

board from its player’s starting position

(compare with Figure 1 which shows these

starting positions).

(b) In this configuration, only R1 and G2 have available exit actions: they

occupy hexes marked for their colour in Figure 3a. B1, B2 and R2 also

occupy hexes on edges of the board, but they are not on the correct edges

to exit for their respective colours. Note that it is not possible to ‘jump off

the board’: For example, even though G1 has an adjacent piece between it

and the edge of the board opposite Green’s starting position, G1 does not

occupy a hex marked g in Figure 3a, so it has no available exiting action.

Figure 3: These diagrams demonstrate the rules for exiting actions.

Ending the game

The game ends as soon as any player has taken 4 exiting actions (as described above). That player wins the game,

and the other two players lose the game. Note that it is not enough simply to have 4 pieces ‘in position’ for exit

actions: a turn must be taken to carry out each of the 4 exit actions to win.

Alternatively, the game may end in a draw with no players winning the game. A draw is declared if either of

the following conditions are met:

One board configuration (with the same pieces occupying the same hexes on the same player’s turn, ignoring

rearrangements of same-coloured pieces) occurs for a fourth time since the start of the game. These repeated

board configurations do not need to occur in succession.

Each player has had their 256th turn (including turns where the player must pass) and no winner has been

declared.

3


相關文章

【上一篇】:到頭了
【下一篇】:沒有了

版權所有:留學生編程輔導網 2018 All Rights Reserved 聯系方式:QQ:99515681 電子信箱:[email protected]
免責聲明:本站部分內容從網絡整理而來,只供參考!如有版權問題可聯系本站刪除。

体彩22选5开奖走势图百度