Building an agent for the board game Hex COMP513 - Autonomous - - PowerPoint PPT Presentation

building an agent for the board game hex
SMART_READER_LITE
LIVE PREVIEW

Building an agent for the board game Hex COMP513 - Autonomous - - PowerPoint PPT Presentation

Building an agent for the board game Hex COMP513 - Autonomous Agents Stefanos Kontos - 2013030195 Our Goal In terms of this project we created an autonomous agent for the board game Hex with graphict Getting Started (1/2) The hex board is an


slide-1
SLIDE 1

Building an agent for the board game Hex

COMP513 - Autonomous Agents

Stefanos Kontos - 2013030195

slide-2
SLIDE 2

Our Goal

In terms of this project we created an autonomous agent for the board game Hex with graphict

slide-3
SLIDE 3

Getting Started (1/2)

The hex board is an 11x11 hexagonal tiling in a rhombus shape,like you can see in the image. Two players, Red and Blue, are assigned opposite edges

  • f the board.

The board is empty at the start of the game and the players have to put the pieces, one by one

slide-4
SLIDE 4

Getting Started (2/2)

❏ The goal for each player is to establish an unbroken chain with the own pieces connecting the two sides of the board marked with the own colour. ❏ The color that every player will use is randomly choiced. ❏ The player with red pieces makes the first move. ❏ Moves entails in placing an own piece on an unoccupied Hexagon; placed pieces cannou be moved. ❏ There is no limit for the number of pieces, so that players place new pieces until one of them reaches the victory.

slide-5
SLIDE 5

The Agent

For the implementation of the agent we used Reinforcement Learning and specifically Q-Learning. a: learning rate γ: discount factor 1000 games played

slide-6
SLIDE 6

Base Functions

❏ Number of pawns (for both players) ❏ Longest path (for both players) ❏ Longest path’s distance to win (for both players) ❏ Variance from the center (for both players) ❏ Longest path that can grow (for both players) ❏ Longest path’s that can grow distance to win(for both players) ❏ Number of free spots

slide-7
SLIDE 7

Learning (1/2)

Q-Learning vs Random Our agent defeated the random agent with almost 100% win ratio

slide-8
SLIDE 8

Learning (2/2)

Q-Learning vs Q-Learning Our agent had a 90% win-ratio vs himself

slide-9
SLIDE 9

Conclusions

The player who makes the first move has increased chances of winning Our agent is great vs random or Q-Learning players but still needs effort to win a human.

slide-10
SLIDE 10

Thank you for your attention! Any Questions?