algorithms to solve Three Man Morris