game-theory

What could cause this to start miscalculating after awhile?

别说谁变了你拦得住时间么 提交于 2019-12-24 16:28:43
问题 I'm trying to implement NegaMax for a game of checkers. I'm just testing it with a depth of 0 right now, meaning the current player just evaluates all his moves without regard to what the other player might do next. It works perfectly for about half the game (computes the scores correctly), and then part way through it starts spitting out non-sense answers. For example, White might have 1 piece left, and Black will have 5, but it will evaluate White's moves as a score of 7 for example, when

Grundy's game extended to more than two heaps

倾然丶 夕夏残阳落幕 提交于 2019-12-24 08:27:08
问题 How can In break a heap into two heaps in the Grundy's game? What about breaking a heap into any number of heaps (no two of them being equal)? 回答1: Games of this type are analyzed in great detail in the book series "Winning Ways for your Mathematical Plays". Most of the things you are looking for are probably in volume 1. You can also take a look at these links: Nimbers (Wikipedia), Sprague-Grundy theorem (Wikipedia) or do a search for "combinatorial game theory". My knowledge on this is

Genetic algorithm for optimization in game playing agent heuristic evaluation function

守給你的承諾、 提交于 2019-12-19 11:43:19
问题 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

Partially re-create Risk-like game based on incomplete log files

一笑奈何 提交于 2019-12-13 14:57:41
问题 I'm trying to re-create this conquerclub (Risk-like) game: http://conquerclub.barrycarter.info/ONEOFF/7460216.html In other words, I want to know who owned each territory at each point in time, and how many troops they had on that territory. My primary source of information is the Game Log. Notes: % It's not in the Game Log, but all territories start w/ 3 troops. % Since we know the territory owners at the end of the game, and the Game Log mentions all owner changes, determining territory

Please tell me the efficient algorithm of Range Mex Query

穿精又带淫゛_ 提交于 2019-12-12 10:39:16
问题 I have a question about this problem. Question You are given a sequence a[0], a 1],..., a[N-1] , and set of range (l[i], r[i]) (0 <= i <= Q - 1) . Calculate mex(a[l[i]], a[l[i] + 1],..., a[r[i] - 1]) for all (l[i], r[i]) . The function mex is minimum excluded value. Wikipedia Page of mex function You can assume that N <= 100000, Q <= 100000, and a[i] <= 100000 . O(N * (r[i] - l[i]) log(r[i] - l[i]) ) algorithm is obvious, but it is not efficient. My Current Approach #include <bits/stdc++.h>

how to build game playing neural network in Python?

萝らか妹 提交于 2019-12-11 02:02:19
问题 I am a neural-network beginner. I'd like to learn the basics of neural networks by teaching computers to play checkers. Actually, the games I want to learn are Domineering and Hex. 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. PyBrain seems to be the clear winner for Python neural networks, but who can walk me through

Why must coq mutually inductive types have the same parameters?

十年热恋 提交于 2019-12-10 15:31:32
问题 Following Arthur's suggestion, I changed my Fixpoint relation to a mutual Inductive relation which "builds up" the different comparisons between games rather than "drilling down". But now I am receiving an entirely new error message: Error: Parameters should be syntactically the same for each inductive type. I think the error message is saying that I need the same exact parameters for all of these mutual inductive definitions. I realize there are simple hacks to get around this (unused dummy

machine learning in Python to play checkers? [closed]

[亡魂溺海] 提交于 2019-12-06 02:47:28
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . 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

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

空扰寡人 提交于 2019-12-05 10:39:37
问题 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

Most effecient way to compute a series of moves in peg solitaire

半城伤御伤魂 提交于 2019-12-05 04:21:16
问题 Given an arbitary peg solitaire board configuration, what is the most effecient way to compute any series of moves that results in the "end game" position. For example, the standard starting position is: ..***.. ..***.. ******* ***O*** ******* ..***.. ..***.. And the "end game" position is: ..OOO.. ..OOO.. OOOOOOO OOO*OOO OOOOOOO ..OOO.. ..OOO.. Peg solitare is described in more detail here: Wikipedia, we are considering the "english board" variant. I'm pretty sure that it is possible to