Questions tagged [chess]

This tag is for the game of Chess and problems getting computers to play it. Use this tag for questions about algorithms and other programming problems specifically related to chess playing. Do not use this tag for general programming questions just because your program plays chess.

Chess is a strategic, symmetrical board game with the goal of placing the opponent's leader piece, known as the King, under attack from one of your pieces such that they are unable to avoid being captured by the next turn. This is known as being placed in "checkmate".

Computer chess engines have become increasingly complex since the early 2000s when they became able to beat the world's leading chess grand masters. Some of the leading chess engines as of 2022 are the opensource Stockfish and Google's AlphaGo.

One might presume that due to the deterministic nature of chess it might be possible to "solve" the game such that a victory or draw would be guaranteed. However, due to the enormous number of possible variations in Chess it remains unsolved even by the most advanced chess engines.

Some current popular evaluation methods used are the Monte Carlo tree search and Minimax search.

External links

1386 questions
-4
votes
1 answer

Moving a knight on a chessboard (Python 3.2.2)

I have a class project which was given to me today and is due in 2 weeks. I have to make a knight from a chess board move around (just the knight, no other pieces) and I have started with this: import math print("This is the program for the…
-4
votes
2 answers

using JPanel in chess in java

in making a chess game in java using JPanel,is there a method that returns whether the container contains anything? for example by defining an array like this: JPanel [8][8] we want to check if there is a man in the square[i][j], so that we can…
Elaheh
  • 1
  • 2
-5
votes
1 answer

Maximum number of Bishops that can be placed on a NxN Chessboard - SPOJ

Using the Constant time formula for Maximum bishops on a chessboard, which is: int maxBishops(N) return 2*(N-1); Implemented for the value of N lesser than 10^100, as follows: https://ideone.com/lvuiXW Verified using Wolfram|Alpha but getting wrong…
-6
votes
1 answer

Adding difficulty levels into Java Chess Game

I am currently working on developing a Java Chess Game and have the game up and running correctly. But I want to add a function at the start where the user is able to select which difficulty they want to play at. I would like to add 3 difficulties,…
Ryan Scollard
  • 45
  • 1
  • 4
  • 11
-7
votes
1 answer

C++ check if there are players on the way in Chess game

i am trying to check if there is a player on the way in the game of chess. to do it i have the following variables this->getLocX(),this->getLocY()(Where the player was), x,y(where the player wants to go) and I have a function boardP->hasPiece(x, y)…
TheGameZ
  • 1
  • 1
1 2 3
92
93