chess

Chess: Extracting the principal variation from the transposition table

耗尽温柔 提交于 2020-01-15 05:00:26
问题 Earlier, I was having an issue involving my principal variation becoming truncated by an alpha-beta search. Indeed, this appears to be a common issue. From the authors of Crafty: Another solution with even worse properties is to extract the full PV from the transposition table, and avoid using the triangular array completely. If the transposition table is large enough so that nothing gets overwritten at all, this would almost work. But there is a hidden “gotcha”. Once you search the PV, you

How can I integrate chess.js and chessboard.js?

蓝咒 提交于 2020-01-07 09:51:52
问题 I am trying to integrate Chess.js and Chessboard.js but I am having some problems along the process. I have downloaded successfully Chessboard.js , unzipped the folder and within it I created a file called index.html that looks like the following: <html> <head> <title>Chess Match</title> <link rel="stylesheet" href="css/chessboard-0.3.0.min.css"> <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> <script src="js/chessboard-0.3.0.min.js"></script> </head> <body> <div id=

Communicating with XBoard (chess engine) (C++/C)

。_饼干妹妹 提交于 2020-01-02 05:13:55
问题 I was just toying around with making a basic chess engine. I was able to get a lot of advice from http://web.archive.org/web/20070704121716/http://www.brucemo.com/compchess/programming/alphabeta.htm, but the real site is down and not all the pages are archived. (Anyone know where to find a full version of Bruce's site?) But now to the real question: how do I communicate with XBoard? I understand it is via stdin and stdout, but I've been having problems in code. Basically, to get started, I

Chess move validation library [closed]

≡放荡痞女 提交于 2020-01-01 09:57:07
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 9 months ago . Is there any library which can be used to validate chess moves and simulate games in .NET? It would be great if the library can understand moves in Algebraic notation and also provide simple API for making moves. For example, game.Move("E2","E4") etc. In the second case, the library should be able to generate

Object Oriented Design for a Chess game [closed]

一笑奈何 提交于 2019-12-29 10:07:08
问题 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 last year . I am trying to get a feel of how to design and think in an Object Oriented manner and want to get some feedback from the community on this topic. The following is an example of a chess game that I wish to design in an OO manner. This is a very broad design and my focus at this

How do I generate all of a knight's moves?

回眸只為那壹抹淺笑 提交于 2019-12-29 08:44:28
问题 I am writing a Chess program in Python that needs to generate all the moves of a knight. For those not familiar with chess, a knight moves in an L shape. So, given a position of (2, 4) a knight could move to (0, 3) , (0, 5) , (1, 2) , (3, 2 ), etc. for a total of (at most) eight different moves. I want to write a function called knight_moves that generates these tuples in a list. What is the easiest way to do this in Python? def knight_moves(position): ''' Returns a list of new positions

Need help on chess game evaluation function

假装没事ソ 提交于 2019-12-25 02:26:30
问题 I am developing a chess game and at the moment I'm trying to implement a minimax algorithm. I haven't done this before, also the little i known about how to programmatically represent and implement the following evaluation function features(material, mobility, piece square table, centre control, trapped piece, king safety, tempo and pawn structure) is not quite clear to me (I will be grateful if someone can explain to me in detail). I have been able to assign values to each chess pieces,

MATLAB: How do I get 3D coordinates from a user-click?

僤鯓⒐⒋嵵緔 提交于 2019-12-24 13:32:55
问题 I'm using Matlab to create a small chess game for one of my courses this semester. The thing I'm having trouble with is having the user be able to select one of the chess pieces. To simplify things, I'm making it so that the user selects a piece by clicking on the square that the chess piece resides on rather than clicking the piece itself (which I assume would be much more difficult). I know how to get the x and y coordinates of the view-port, but how do I transform these coordinates into 3

Error when generating a grammar for chess PGN files

纵然是瞬间 提交于 2019-12-24 13:11:19
问题 I made this ANTLR4 grammar in order to parse a PGN inside my Java programm, but I can't manage to solve the ambiguity in it : grammar Pgn; file: game (NEWLINE+ game)*; game: (tag+ NEWLINE+)? notation; tag: [TAG_TYPE "TAG_VALUE"]; notation: move+ END_RESULT?; move: MOVE_NUMBER\. MOVE_DESC MOVE_DESC #CompleteMove | MOVE_NUMBER\. MOVE_DESC #OnlyWhiteMove | MOVE_NUMBER\.\.\. MOVE_DESC #OnlyBlackMove ; END_RESULT: '1-0' | '0-1' | '1/2-1/2' ; TAG_TYPE: LETTER+; TAG_VALUE: .*; MOVE_NUMBER: DIGIT+;

Not able to communicate with “Stockfish-9-armv7” binary file

心已入冬 提交于 2019-12-24 08:26:02
问题 I am developing a Chess Game in Unity3D. I want to develop it for the Android platform. For AI I am using the Stockfish Chess Engine. I downloaded the Stockfish binary for Android named " Stockfish-9-armv7 ". I placed this binary file in my StreamingAssets folder so that it correctly goes into the targeted platform during build step. Everything works fine till here i.e. when I build my Unity project the file is placed in the correct location and I can very well see it. Now in order for my AI