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 11x11 hexagonal tiling in a rhombus shape,like you can see in the image. Two players, Red and Blue, are assigned opposite edges of the board. The board is empty at the start of the game and the players have to put the pieces, one by one
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.
The Agent For the implementation of the agent we used Reinforcement Learning and specifically Q-Learning. a: learning rate γ : discount factor 1000 games played
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 ❏
Learning (1/2) Q-Learning vs Random Our agent defeated the random agent with almost 100% win ratio
Learning (2/2) Q-Learning vs Q-Learning Our agent had a 90% win-ratio vs himself
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.
Thank you for your attention! Any Questions?
Recommend
More recommend