Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [chess]

This tag is for chess related programming. You probably want to also include some more general tags such as [tag:algorithms], [tag:data-structures], [tag:application-design] if you are asking about chess game programming.

4
votes
1answer
336 views

What do I not understand about Alpha-Beta-Pruning in Chess?

I'm trying to write a chess engine, Min-Maxing works. Now I wanted to implement Alpha-Beta-Pruning, but despite reading about it and watching videos, I must have a severe misunderstanding somewhere. ...
3
votes
3answers
259 views

Chess: Efficiently deciding whether a check mate has been made

This question addresses building a Chess engine. I've done just that, and in my humble opinion quite elegantly. But I'm missing my ending conditions. Here are some pseudopython functions that I use. ...
0
votes
1answer
174 views

Modification in knight's tour problem

So i have a modified knight's tour problem. The problem is the following , is there an algorithm that can give you the route(if possible the shortest) from (1,1) to (n,m) in a chessboard of the knight ...
4
votes
3answers
178 views

Is it acceptable to look at other people's projects for ideas? [closed]

When I start a new project, I tend to look at other people's source code who have implemented the same project. This gives me an idea on how the overall project is supposed to be created and the basic ...
1
vote
5answers
512 views

What programming paradigm do you think would work best for the AI aspect of a chess engine?

I wish to write a chess AI which simulates the way I think over the board, using C++. My focus is on writing the algorithms for choosing moves (decision making), not defining the board and pieces. To ...
0
votes
3answers
2k views

C++ Chess board design and smart pointers [closed]

I wrote a Chess engine in Java and I am porting it over to C++. I am new to C++. The idea: I have a Board object which holds a 2-dimensionnal array of Piece objects. Queen, Rook, Bishop, etc are ...
6
votes
3answers
621 views

How to decompose / model a chessboard

As someone new to programming, I am building a chess web application in JavaScript, both for fun and to learn more about design patterns. I keep running into a wall, which is how to decompose the ...
1
vote
1answer
171 views

Implementation/Representation of Symmetries in Chessboards

In a 8X8 chessboard, I was wondering how to implement the symmetry of the board. A lot of positions are just mirrors or rotations of one another (with no pawns or castling capabilities left the ...
3
votes
2answers
731 views

Implementation of chess endgame engine without Endgame Tablebases

I'm interested in creating an chess endgame solving engine. The endgames in chess are usually solved using the endgame table-bases generated by retrograde algorithm. I have found that Artificial ...
4
votes
4answers
945 views

Implementation of algorithm to generate chess positions

I am interested in developing a program that generates an endgame table-base for the chess. I have gone through the technical papers of the greats like Shannon and Ken Thompson. I have found that ...
2
votes
3answers
863 views

How does a chess engine decide what move to make?

I'm writing a simple chess engine in LISP. I actually know how the engine decide the move, it evaluates and reads some opening books. But that's not what i mean. This is my design. 57 58 59 60 61 62 ...
1
vote
5answers
4k views

What would be the fastest way of storing or calculating legal move sets for chess pieces?

For example if a move is attempted I could just loop through a list of legal moves and compare the x,y but I have to write logic to calculate those at least every time the piece is moved. Or, I can ...
3
votes
1answer
711 views

Which programming guidelines for a chess network application?

I'd like to implement a simple chess peer to peer network application : one instance of the program may register friends player, and when one friend is "connected" (I mean both available by another ...
1
vote
3answers
252 views

About classes and their valid states

I get stuck each time I need to write a constructor for any class I design. The reason is that I am not sure what should go into a constructor and what should not. On googling for this, I got the ...
3
votes
3answers
552 views

Language for Chess Position Evaluation (experimental) [closed]

My aim is to, via pattern analysis and statistics, (as well as piece mobility and position) build a chess position evaluation analyzer (rather than simply going brute force ply-searching). Id like ...
15
votes
10answers
14k views

Best approach for writing a chess engine? [closed]

I'm a chess enthusiast and a programmer. I recently decided to start making a chess engine using my chess and programming knowledge. So here's my question: What language (I'm familiar with Java, C++ ...
10
votes
7answers
5k views

N queens, X by Y board decision problem interview question

I was asked the following question in an interview today and I've been thinking about it ever since. I was not able to answer it and haven't been able to find a solution online. Given a chess board ...
1
vote
1answer
920 views

Writing a game engine using javascript

..by this I mean a logic handler for a chess game. Basically validating a move and checking if somebody has won. Now ignore the complexity of the game(if you can..) I'd like some sort of psuedo code ...
11
votes
9answers
1k views

Learning the rules of chess

A similar question asks whether a computer can learn to play optimally in chess by analyzing thousands of games. If a machine can look at the state of the board for a few games of chess (or a few ...
9
votes
4answers
3k views

Which paradigm to use for writing chess engine?

If you were going to write a chess game engine, what programming paradigm would you use (OOP, procedural, etc) and why whould you choose it ? By chess engine, I mean the portion of a program that ...