All groups for the project must be ready by next Monday (11 December) - I've just received one email so far
It's a bit of time I don't see any active interaction in the mailing list. What's it happening?
It is an artificial intelligence developed by Google DeepMind for playing to Go
Before 2015: several software have been developed to play to Go automatically, but all of them showed their limits when tested with human expert players of the game - in fact, no Go software was able to beat a human master
In 2015: Google declared to have developed the best artificial intelligence for playing to Go, and asked to test it in international matches against the strongest Go players
Match in October 2015, best of five games
Fan Hui was the champion of the European Go Championship in 2013, 2014 and 2015 (professional 2 dan player)
Result: 5 - 0
Match in March 2016, best of five games
In 2016, Lee Sedol was ranked second in international titles (professional 9 dan player, max rank)
Result: 4 - 1
Match in May 2017, best of three games
In 2017, Ke Jie was ranked number one in the world (professional 9 dan player, max rank)
Result: 3 - 0
Match in October 2017, best of one hundred games
AlphaGo Zero has been trained without using any existing human knowledge – i.e. the matches between human champions that have been archived in the past, that have been actually used for training AlphaGo
Result: 100 - 0
Algorithms for finding a solution to abstract strategy board games are based on a tree (node = possible move)
Backtracking algorithms find a solution by identifying possible candidates incrementally, and abandons partial candidates if they won't provide a solution
[leaf-win] if current node is a leaf and it is a solution then return it, otherwise
[leaf-lose] if current node is a leaf but it is not a solution, then return no solution back the parent node, otherwise
[recursive-step] apply recursively the whole approach for each child of the current node, until one of these recursive executions returns a solution - if no solution, back the parent node of the current one
It is a board game for one person only which involves the movement of some pegs on board containing holes
Starting situation: the entire board is filled up with pegs except the central position which is empty
Goal: whole board is full of holes except the central position which must contain a peg
Valid move: moving orthogonally a pag over an adjacent peg into a hole two position away, removing the jumped peg from the board
Computational problem: find a sequence of moves that allows one to solve the peg solitaire
[leaf-win] if last move brought to only one peg in the board in central position, then a solution has been found and return it, otherwise
[leaf-lose] if last move brought to a situation where no additional moves are possible, then recreate previous status of the board and return no solutions, otherwise
[recursive-step] apply recursively the algorithm for each possible valid move executable according to the current status of the board, until one of these recursive executions of the algorithm returns a solution – if none of them provide a solution, recreate the previous status of the board and return no solutions
(2,0) (3,0) (4,0) (2,1) (3,1) (4,1) (0,2) (1,2) (2,2) (3,2) (4,2) (5,2) (6,2) (0,3) (1,3) (2,3) (3,3) (4,3) (5,3) (6,3) (0,4) (1,4) (2,4) (3,4) (4,4) (5,4) (6,4) (2,5) (3,5) (4,5) (2,6) (3,6) (4,6)
Two sets of tuples:
pegs
: the list of the positions occupied by pegs - starting situation: all position but (3,3)
holes
: the list of the positions with no pegs - starting situation: only (3,3)
def valid_moves(pegs, holes)
: it returns a list of tree nodes, where each node represent a possible move that one can execute according to the current status of the board (defined by the two input sets pegs
and holes
def apply_move(node, pegs, holes)
: execute the move defined by the input node, and change the status of the board accordingly
def undo_move(node, pegs, holes)
: undo the move defined by the input node, and change the status of the board accordingly
def solve(pegs, holes, last_move=Node("start")):
result = None
if len(pegs) == 1 and (3, 3) in pegs:
result = last_move
else:
last_move.children = valid_moves(pegs, holes)
possible_moves = deque(last_move.children)
while result == None and len(possible_moves) > 0:
current_move = possible_moves.pop()
apply_move(current_move, pegs, holes)
result = solve(pegs, holes, current_move)
if result == None:
undo_move(current_move, pegs, holes)
return result
First execution:solve(initial_pegs, initial_holes)
If you have an infrastructure similar to the one used by Google DeepMind for developing AlphaGo, than I encourage you to run the algorithm shown in the previous slide
If that is not the case, don't try to run it in any computer since I really do not know how many years and memory space can take for finding a solution to the problem
silvio.peroni@unibo.it 0000-0003-0530-4305 @essepuntato
Computational Thinking and Programming (A.Y. 2017/2018)
Second Cycle Degree in Digital Humanities and Digital Knowledge
Alma Mater Studiorum - Università di Bologna