Questions tagged [chess]

This tag is for concepts involving the game of Chess.

Filter by
Sorted by
Tagged with
14
votes
3answers
3k views

N-Queens - Brute force - bit by bit

A discussion in The 2nd Monitor made me realize I had never 'solved' the N-Queens problem. Additionally, as I read up on it, I realized that the 64-squares in a chess board would work well if ...
20
votes
2answers
2k views

Enum, constants, or other to represent chess pieces

I'm learning C# and I decided to write a chess program to help me practice the concepts I'm learning in my book. I started the Board class tonight, which is going to handle 1) the board state and 2) ...
76
votes
6answers
213k views

Design a chess game using object-oriented principles

I would like to know if my approach is correct and how could it could be improved? Also, is there a way to get rid of the relation between the Piece and the ...
5
votes
2answers
841 views

Algorithm for describing chess positions

I have an interesting problem with my chess application. The application reads PGN files, and at any time while viewing a game from the file, the function below, when called, iterates over the ...
10
votes
4answers
2k views

Chess Architecture

I am currently developing a chess game but have made the mistake of putting all my Java code in one .java file. I need help cutting up my code into more manageable chucks. Could someone show me how ...
10
votes
1answer
150 views

Queens placement

The code below is intended to be a learning material for high school intermediate programming class, as an introduction to recursion and backtracking. I was thinking of rook placement and found it too ...
9
votes
3answers
38k views

Generating possible Chess moves

Here is the solution to generating possible moves and keeping the king safe. If someone is willing to look it over and come with some suggestion to perhaps improve it, I would appreciate it. Full ...
10
votes
3answers
990 views

First Chess project

I'd made a project using pygame in python around 3 months ago. This was my first big project after I started learning how to program in college. Now I'd like to know just how good my programming ...
3
votes
1answer
972 views

Calculating potential Chess moves

I started a Chess in Python for fun. I learned Python in my free time but I've been doing it for a while. The code works but I just want to know if there's anything non-pythonic in my code. The ...
6
votes
2answers
344 views

Central Delannoy numbers

I am solving this problem on SPOJ Upper Right King (Hard): There is a king in the lower left corner of the \$ n \times n \$ chess board. The king can move one step right, one step up or one step up-...
5
votes
2answers
21k views

Chess board representation in Java

I'm currently working on a small chess game written in Java (on GitHub). The board is modeled as a Board object with a 2D array of Piece objects : ...
1
vote
1answer
2k views

Eight Queens Heuristic

I am trying to solve the 8 queens problem using a heuristic similar to "the accessibility heuristic" used in Knight's Tour problem. this heuristic simply means that each square of the chess board has ...
4
votes
2answers
2k views

Chess engine in Ruby

I've decided to write a Chess engine in Ruby. The first step (before any move generation, AI, search trees, etc.) is to get a solid board representation so the computer and I can effectively ...

1 2 3
4