chess

Programming a chess AI

I'm looking to try and write a chess AI. Is there something i can use on the .NET framework (or maybe even a chess program scripted in Lua) that will let me write and test a chess AI without worrying about actually makign a chess game? ...

Chess Logic in XNA

So I've created a 2D chess game board with all the pieces on it using the XNA library and all. However I don't know how to make the pieces move if I click them. This is what I have for the logic of one of the knight pieces. if(mouse.LeftButton == ButtonState.Pressed && mouse.X == wknight1.position.X && mouse.Y == wknight1....

Programmer Puzzle: Encoding a chess board state throughout a game.

Not strictly a question, more of a puzzle... Over the years, I've been involved in a few technical interviews of new employees. Other than asking the standard "do you know X technology" questions, I've also tried to get a feel for how they approach problems. Typically, I'd send them the question by email the day before the interview, an...

Preventing cheating in online chess games?

In many online chess lobbies, I've seen instances of 'engining', where a cheater would open a chess program at the same time as the main game window. He would then set it up so that the opponent's moves are relayed to the computer, then which he would copy the computer's moves, until he (almost always) wins. As a game developer and mode...

Chessboard in WPF

For years I've developed with Winforms, now I want to switch to WPF and make a chessboard. Unfortunately I have no idea where to start. Using WPF makes me very unsure, I'm feeling like a noob again. Can someone outline a basic design? I guess I would start with a 8x8 Grid and use rectangles for the squares, images for pieces. And then? A...

Currently known best algorithm(s) for computer chess ?

I just wanted to learn name of algorithms.. thanks ...

C# minimax tree realization

Hello. I'm trying to write C# Chess AI. At that moment I have to build my minmax tree. I try by using recursion, but my recursive funtions has to call itself about 1 000 000 times for every node. I get Stack Overflow exception after about... 60 000 calls. ...

How does minimax work?

Here's the case. I'm trying to make a Chess engine. Not that I believe that I can make anything better than what's already out there, but I want to see how it works. I've made some of the important parts, such as board representation and the evaluation function. The evaluation function seems to produce decent results, so now I need to im...

Chess game in javascript

Is there any Chess game API , purely written in javascipt ? No Flash! Anybody know the algorithm(in general) used in Chess games ? ...

Bitwise operations on Java Enumerations; RE: Chess E.G.

If I were keeping an array in C representing a chess board, I might fill it with enumed items that roughly look like: enum CHESSPIECE { none = 0, pawn, knight, bishop, rook, queen, king, type_mask = 7, white = 8, white_pawn, white_knight, white_bishop, white_rook, white_queen, white_king, black = 16, black_pawn, black_kig...

how to develop a multi player chess ?

Hi , I wana develop a multi-player chess using c# but I don't have any idea of how to implement the restriction rules of chess with c# to be honest i've never done even a little bit of game programming in my life so that I don't have any idea of how to work in this area. is there any simple sample of chess program source code out there...

AI Chess Valid Moves

Hello everybody! I am trying to write AI Chess and I have a problem. I am ready with pieces movement rules, and I'm trying to remove moves that are not valid (leave the king in check etc). I Wrote something like this: ValidateMove(board); { for(i=0;i<64;i++) if(board[i]==king.opposite) kingpos=board[i]; createmoves(board); if (moves.c...

Knight's Shortest Path Chess Question

I've been practicing for an upcoming programming competition and I have stumbled across a question that I am just completely bewildered at. However, I feel as though it's a concept I should learn now rather than cross my fingers that it never comes up. Basically, it deals with a knight piece on a chess board. You are given two inputs: s...

Running unit tests under Chess

When trying to run my unit test under Chess, it get the following error: Hosting rules specify that the test type 'Unit Test' cannot run in the host adapter 'Chess'. To run this test in 'Chess', change the hosting rules. To use the default test host for tests that cannot be run in the specified host adapter, change the te...

Free Chess AI library, ideally in Lua (or something easily translatable to Lua)?

Title says it all. A full game or application is not needed; just a core library that ideally can: be competitive against a human have configurable difficulty have customizable moves (I might need some unique moves that don't exist in traditional chess) The platform is a closed system that can only run Lua, so I don't even have acces...

How do you port a chess AI to iPhone

I would like to port a chess AI to iPhone, but I can't figure out how to do it. Apparently iPhone doesn't support multi threading so you can't just seperately compile the AI, but have to somehow merge it into the code. I have a GPL copy of a implementation of the sjeng engine, but I can't figure out how they did it because it's written...

Should I use OpenGL for chess with animations?

At the moment I am experimenting with SurfaceView for my chess game with animations. I am getting only about 8 FPS in the emulator. I draw a chess board and 32 chess pieces and rotate everything (to see how smooth it is), I am using antialiasing. On the Droid I'm getting about 20FPS, so it's not very smooth. Is it possible to implement a...

chess board in java

This is my code below import javax.swing.*; import java.awt.*; public class board2 { JFrame frame; JPanel squares[][] = new JPanel[8][8]; public board2() { frame = new JFrame("Simplified Chess"); frame.setSize(500, 500); frame.setLayout(new GridLayout(8, 8)); for (int i = 0; i < 8; i++) { for (int j = 0; j < ...

How do I communicate with an unrelated process using its command line interface?

I'm trying to write a C++ program in Linux that communicates with a chess engine via its command line interface. Chess engines have standard protocols like UCI so, if I could write this, I could use different chess engines interchangeably. My C++ program should start the chess engine, send it a command, get the output, send it a comma...

C++, using one byte to store two variables

Hi All I am working on representation of the chess board, and I am planning to store it in 32 bytes array, where each byte will be used to store two pieces. (That way only 4 bits are needed per piece) Doing it in that way, results in a overhead for accessing particular index of the board. Do you think that, this code can be optimised o...