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
-3
votes
3 answers

C algorithm to try out all the possible combinations of 12 knights in a chess board

I have been writing this program that tries to find how to put 12 knights on a chess board so all squares are either taken up by a knight or one of 12 knights can reach them in one move. So far I have created 2 functions: one takes a board with 12…
Gytis
  • 23
  • 5
-3
votes
1 answer

haskell Chess Knight Tour: Function composition

I've a hard time understanding a Chess Knight problem concerning function composition. The exercise is a generator/filter/selector chain with a given wrapper function (knightProblem) which glues everything together. It is unclear to me how the…
-3
votes
1 answer

How to detect who is move white or black in python-chess library?

I am created some chess program and want to detect who have move white or black. Which objects stores information which pieces will move Board, GameNode? import chess.pgn import chess.uci # ??? Board().is_white_move()? # ???…
Chameleon
  • 9,722
  • 16
  • 65
  • 127
-3
votes
1 answer

What is the maximum strength of a chess engine with a board representation using an 8 by 8 array?

I am trying to program my first chess engine, and I am using chessprogramming.wikispaces.com as a resource. My first attempt was to use bitboards considering their performance perks and for the fact that popular engines such as Deep Blue used…
zc917
  • 107
  • 1
  • 5
-3
votes
2 answers

Connect Chess Engine with C++ GUI Program

I want to connect my C++ Program with a Chess Engine in order to have AI for the enemy. In my c++ program-->User will make a move(eg. A2A3)-->I will pass this string to chess engine-->engine will update board-->engine will start A.I for calculating…
mariosbikos
  • 429
  • 1
  • 5
  • 11
-3
votes
2 answers

Moving chess pieces in native javascript

I'm having some problems with my assignment, which was to make chess pieces move freely across the board without the use of ids in native javascript. I have managed to set them on board and have also tried with getting coordinates from clicking on…
Resource2357
  • 3
  • 1
  • 3
-3
votes
1 answer

Chess Game Project VB.net

I am making a chess game in vb 2010 here's my codes UPDATED Imports System.Drawing.Image Public Class Form1 Dim MD As Boolean Dim BLACK(5) As Image Dim WHITE(5) As Image Dim corX1st As String Dim corY1st As String Dim corX2nd As String Dim corY2nd…
-4
votes
1 answer

checkers/ draughts game ? can this work or am i on the wrong path

import java.awt.*; import java.awt.event.*; import javax.swing.Action; import java.util.*; import java.io.*; import javax.swing.*; public class testout extends JFrame{ public JLabel l1; //declaring images ImageIcon a= new…
wamae
  • 660
  • 9
  • 21
-4
votes
1 answer

my method is incorrect I want help to modify it

this is a method that return array have all the positions that a knight(in chess) make in one move , the problem that i put the size of array 8 , the chess board is (8x8) , the problem that , example : if the knight at position (1,1) this method…
rana
  • 1
  • 1
-4
votes
1 answer

clarifying this Java code and few ambiguities of this bot code

I am working on this Chess bot code, in Java which is new to me. While I understand most of the what the code does, I am not sure I do understand it a full extent. In addition to that there is few things that confuses me in the code. for example…
user12581183
-4
votes
1 answer

Python Chess Project

So im trying to make a chess game and im super close but i cant figure out how to select a variable to change using: ___ = input() so heres an example x = 1 y = 2 z = 3 variable = input() #I would select x and i want to be able to select what…
Censored
  • 33
  • 1
  • 1
  • 5
-4
votes
1 answer

I tried to make c array that draw 8x8 chesstable.Help me please?

#include #include int main() { const char *chess[8][8]; //using 2 dimensional array chess[0][0] = "X"; chess[0][2] = "X"; chess[0][4] = "X"; //writing values step by step chess[0][6] = "X"; …
bgobekli
  • 33
  • 1
  • 8
-4
votes
1 answer

How should I proceed for building a website where you can play chess with other people?

I'm a beginner: I know HTML/CSS and a little Javascript. Also, I've started learning Python. As a first personal objective, I want to build a site where you can play with friends simply by sending them a URL (like lichess.org does). No need for…
Pigna
  • 2,792
  • 5
  • 29
  • 51
-4
votes
1 answer

Chess Game: Segmentation Fault Error. Can you find it?

Can you find my error? The program compiles, but when running it will crash and say segmentation fault: 11 after the fifth line. The program is in 3 files. I am making a chess game and right now all it is supposed to do is print the board. This is…
-4
votes
4 answers

Chessboard - HTML(5) only

I'm new in HTML and I came to the exercise, where I have to make chess board in HTML only. I searched a lot on the google and I found many solutions with Canvas and CSS, but I want to do it with HTML and then write the names of the rows and columns…
user2928585
  • 11
  • 1
  • 2
  • 5
1 2 3
92
93