game-theory

machine learning in Python to play checkers? [closed]

帅比萌擦擦* 提交于 2019-12-04 07:57:50
I am a machine learning beginner. I'd like to learn the basics by teaching computers to play checkers. Actually, the games I want to learn are Domineering and Hex . My language of choice is Python These games are pretty easy to store and the rules are much simpler than chess, but there aren't too many people who play. If I can get this idea off the ground it would be great for experimenting Combinatorial Game Theory to see if a computer and find the optimal move. I found this old paper on checkers from the 1960's by a guy at IBM. Originally I had asked about neural networks , but they are

How to implement efficient Alpha-Beta pruning Game Search Tree?

白昼怎懂夜的黑 提交于 2019-12-03 21:51:35
I'm trying to learn about artificial intelligence and how to implement it in a program. The easiest place to start is probably with simple games (in this case Tic-Tac-Toe) and Game Search Trees (recursive calls; not an actual data structure). I found this very useful video on a lecture about the topic. The problem I'm having is that the first call to the algorithm is taking an extremely long amount of time (about 15 seconds) to execute. I've placed debugging log outputs throughout the code and it seems like it is calling parts of the algorithm an excessive amount of times. Here's the method

Optimal Algorithm for Winning Hangman

瘦欲@ 提交于 2019-12-03 16:36:54
问题 In the game Hangman, is it the case that a greedy letter-frequency algorithm is equivalent to a best-chance-of-winning algorithm? Is there ever a case where it's worth sacrificing preservation of your remaining lives, for the sake of a better chance of guessing the correct answer? Further clarification of the problem: The selected word to be guessed has been taken from a known dictionary. You are given N lives, and thus have to maximise the probability of guessing all the letters in the word

Genetic algorithm for optimization in game playing agent heuristic evaluation function

余生颓废 提交于 2019-12-01 14:04:44
This is in response to an answer given in this question: How to create a good evaluation function for a game? , particularly by @David (it is the first answer). Background : I am using a genetic algorithm to optimize the hyper parameters in a game playing agent that is using minimax / alpha beta pruning (with iterative deepening). In particular, I would like to optimize the heuristic (evaluation) function parameters using a genetic algorithm. The evaluation function I use is: f(w) = w * num_my_moves - (1-w) * num_opponent_moves The only parameter to optimize is w in [0,1]. Here's how I

How to create a good evaluation function for a game?

萝らか妹 提交于 2019-11-29 21:48:06
I write programs to play board game variants sometimes. The basic strategy is standard alpha-beta pruning or similar searches, sometimes augmented by the usual approaches to endgames or openings. I've mostly played around with chess variants, so when it comes time to pick my evaluation function, I use a basic chess evaluation function. However, now I am writing a program to play a completely new board game. How do I choose a good or even decent evaluation function? The main challenges are that the same pieces are always on the board, so a usual material function won't change based on position,

How to create a good evaluation function for a game?

独自空忆成欢 提交于 2019-11-28 17:36:55
问题 I write programs to play board game variants sometimes. The basic strategy is standard alpha-beta pruning or similar searches, sometimes augmented by the usual approaches to endgames or openings. I've mostly played around with chess variants, so when it comes time to pick my evaluation function, I use a basic chess evaluation function. However, now I am writing a program to play a completely new board game. How do I choose a good or even decent evaluation function? The main challenges are

Is there a perfect algorithm for chess? [closed]

故事扮演 提交于 2019-11-28 15:01:48
I was recently in a discussion with a non-coder person on the possibilities of chess computers. I'm not well versed in theory, but think I know enough. I argued that there could not exist a deterministic Turing machine that always won or stalemated at chess. I think that, even if you search the entire space of all combinations of player1/2 moves, the single move that the computer decides upon at each step is based on a heuristic. Being based on a heuristic, it does not necessarily beat ALL of the moves that the opponent could do. My friend thought, to the contrary, that a computer would always

Is there a perfect algorithm for chess? [closed]

梦想与她 提交于 2019-11-27 19:43:36
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 4 months ago . I was recently in a discussion with a non-coder person on the possibilities of chess computers. I'm not well versed in theory, but think I know enough. I argued that there could not exist a deterministic Turing machine that always won or stalemated at chess. I think that,