Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

How to Enable Premove in InputHandler

I am using cm-chessboard and I am trying to allow the player to drag his own pieces even though is not his turn. I am trying to accomplish this so I can allow premove. Premove means I am allowed to &...
dianesis's user avatar
  • 332
0 votes
0 answers
40 views

strange mistake when using Python chess library, after set.fen() and push(move), board.legel_moves generates wrong moves

I am writing a small chess GUI with Python chess library. Yesterday, I ran my code a lot of times without any problem. Then I installed some other Python libraries. Today I noticed a strange mistake: ...
user28471654's user avatar
0 votes
0 answers
28 views

Will Warnsdorff´s algorithm work with movement 3/2? [closed]

Is it possible to use only Warnsdorff’s algorithm even if we change the knight's movement from 2/1 to 3/2? Backtracting on top might help, but will it still be enough?
Happybara's user avatar
2 votes
3 answers
108 views

Extracting non-standard evaluation scores from PGN comments using python-chess

I have a PGN file, which is an output of Cute Chess. 1. e4 {+0.42/27 1.6s} e5 {-0.21/26 5.4s} 2. Nf3 {+0.34/22 0.94s} Nc6 {-0.16/19 0.37s} 3. Bb5 {+0.35/27 2.1s} Nf6 {-0.19/26 0.80s} 4. O-O {+0.33/...
user28471654's user avatar
-1 votes
1 answer
25 views

Approach for Handling Unfinished Chess Games When Both Players Disconnect

I need to figure out what to do if both players leave the game without finishing it. In this case, I need a solution to preserve the current game state and determine when the game should be considered ...
Артем Асеев's user avatar
-1 votes
0 answers
64 views

I have almost correct but not quiet code in Python for computing chess endgame with nonstandard pieces on the board

My problem is that the code doesn't correctly handle 3 nor 4 pieces on the board. The code is here at pastebin: xkwDAZEc I would like to have it fixed. My problem is that the code doesn't correctly ...
Jan Pax's user avatar
  • 17
-1 votes
0 answers
27 views

I have problems with creating a kaggle competition

I was trying hard to create a competition in Kaggle. If I understand it correctly, I can upload a code somewhere at Kaggle (as a notebook) and than wait if someone was able to correct it so that the ...
user852508's user avatar
0 votes
2 answers
97 views

My chessboard has no color, how do I add color to the boxes or spaces of it? [duplicate]

I am making a Chess game, atm I am making a chessboard and was about to finish when I realized that it has no color and was like... "How do I add color?" Heres the code, where and how do I ...
Stefan Valentine's user avatar
0 votes
1 answer
41 views

parsing moves from pgn

i have a service, that gets a game from database and adding moves to it. also, it edits current pgn (string of moves).Is there any functions, that can get given string of moves and parse moves from it?...
vladimirOmSu's user avatar
2 votes
0 answers
113 views

How can I make lookups in c++ as fast as possible?

I'm trying to create a chess bot. I'm using bit-boards to represent the board and pieces. I read online from several sources that using PEXT for sliding piece lookups makes your code really fast. I ...
Michael's user avatar
  • 27
0 votes
0 answers
56 views

My alpha-beta pruning implementation is too slow

I'm working on an algorithm that evaluates chess positions in C#. Unfortunetly, the implementation is too slow. I have been waiting an hour, but the method still hasn't reached the end, even when ...
2215436235523676312513513's user avatar
0 votes
0 answers
40 views

How to Recognize Chessboard Corners with OpenCV from Side View Image with Pieces on Board?

I'm using OpenCV for chessboard corner detection from a side-view image where pieces are present on the board. I've processed the image through several steps including grayscale conversion, Gaussian ...
mxcom's user avatar
  • 1
1 vote
1 answer
49 views

I can't figure out what is wrong with my output to the program perftree

I am building a chess engine and I am trying to test it using this program I've used before called perftree. In order to get perftree to work with my code I need to format my output in a certain way. ...
UnoriginalName369636's user avatar
0 votes
1 answer
84 views

Implementing Stockfish Into Unity

I'm really struggling to implement stockfish into unity with c#, I've seen a lot of people using standard input to read off of stockfish. although, my program will freeze no matter what I do. (Right ...
Blaze's user avatar
  • 1
1 vote
1 answer
66 views

Bitshift in a bitmap calculation doesn't seem to work

I have a CLI chess program that takes in input from user(eg: 'e2e4') and converts it into two bitmaps i.e., s_map and e_map. The bitmaps are represented like 0x0000000000000000ULL; where the ...
Syntax Error12's user avatar
1 vote
1 answer
41 views

Python subprocess.popen deadlocking if manipulating stdin and stdout?

I wrote a script to manipulate stdin and stdout for a chess engine. Basically I open the program with subprocess.popen and manipulate input and output using threading.Thread for each. However, if ...
DeepKling's user avatar
  • 154
0 votes
3 answers
129 views

How can i do a rewind button for my Chess game code? C++

I am doing a little project of chess in C++ for my homework. The problem is i don`t know how to copy the dynamic array of my last move (So for example white do an illegal move but have a copy of the ...
Сергій Дегтярьов's user avatar
0 votes
2 answers
70 views

UseState doesn't update value everywhere at component

I'm trying to build a React web-app that allows people to solve chess puzzles. I used a chessground library to render the chessboard and chess.js library to handle chess logic. I created a component ...
Yan Vitkovskiy's user avatar
0 votes
1 answer
59 views

I am creating a chess game in Unity 2D and having an issue with the moveplates. Cannot seem to get them into proper position and alignment

I started with doing everything right from the start, all functionalities are working but the positiong of the MovePlates that are supposed to highlight the possible moves are not aligning properly. I ...
MANSHA RAJKUMAR's user avatar
0 votes
0 answers
33 views

Stockfish Stop Command Not Working Consistently on Raspberry Pi when called too fast

I'm developing a software application designed to run on a Raspberry Pi 5 8gb as part of a smart chessboard project. The board will feature a touchscreen display. While my code is still a work in ...
Francesco Albano's user avatar
-2 votes
1 answer
79 views

How to not let the chess kings move into each other's square in pygame?

I'm making a chess game using pygame, most of the problems and bugs are solved hopefully but there's only one more that's bugging me out. In chess, kings cannot move to other king's adjacent squares. ...
user26649650's user avatar
-1 votes
1 answer
77 views

Basic Alpha Beta algorithm giving wrong evaluation

I was in the process of optimizing my chess engine in python when I was doing some testing on this position (engine as black) with a depth of 4: board and everything seemed fine until I looked at the ...
Victor Terme's user avatar
-1 votes
1 answer
77 views

"AssertionError: san() and lan() expect move to be legal or null" In Python Chess Program

import chess import chess.pgn import chess.engine import tkinter as tk from tkinter import simpledialog import os from tqdm import tqdm # Function to get FEN position from a popup window def ...
Vương Quốc Hiển's user avatar
0 votes
1 answer
57 views

Illegal Argument when trying to draw

I'm trying to draw a chess piece on the board I created but keep getting an error that seems my picture can't be found. Exception in thread "main" java.lang.IllegalArgumentException: input ==...
Anthony McKinney's user avatar
0 votes
1 answer
46 views

How fixPGN file/game import with React app

I'm trying import a pgn file and its throwing an error, but if I rename the file to txt it works, but I prefer it like pgn instead renaming it. // React app created with Vite: npm create vite@latest //...
Lars Kuerten's user avatar
0 votes
0 answers
160 views

Chess Evaluation python

How can i get evaluation for position using python chess.engine? I have a task: write adaptive chess bot for students using python My idea: try to find out, how many best, excellent, good and bad ...
vladimirOmSu's user avatar
0 votes
0 answers
63 views

Customize board into 16x8 in chess using package chess.js or react-chessboard

I made a chess game, then I wanted to change the rules in it such as making the board bigger with a size of 16x8 and also changing the turn base system to a cooldown system I was trying to customize ...
Alan Ari's user avatar
0 votes
0 answers
76 views

Neural Network for Chess Move Prediction Fails to Learn Appropriate Output

I'm working on a neural network to predict chess moves based on a dataset of 1,200,000 chess game positions. Despite the large dataset, my model is not learning appropriately, achieving a peak ...
randomUser's user avatar
0 votes
1 answer
404 views

Is there any way to speed up the prediction of a model?

We are currently building Neural Network using keras and tensorflow for evaluating chess positions. And we have encountered the problem with speed of prediction on a single sample, which is used in ...
Jan Hrdina's user avatar
0 votes
0 answers
69 views

New figures on the Chess-Python-Board

I want to add to my Python Chess Endgame Engine 3 new figures:Amazon, Bob and Cyryl.Amazon moves like knight and bishop,Bob as a rook and knight and Cyryl as Queen and Knight. I have code like this. ...
user22758952's user avatar
2 votes
0 answers
47 views

Pygame Offset Grid by Fraction or Pixels [duplicate]

I am working on a Chess block by following a YT video, but I want my board more centered. I did that, however, now my event.get() event.pos isn't working quite right. About 15 pixels from the bottom ...
Nathan Kamprath's user avatar
0 votes
1 answer
67 views

Cancelling a search running in a separate thread (chess engine)

I'm currently working on my chess engine in C#, Unity. My engine runs a search in a separate thread, so the Unity main thread works fine while calculating. To stop my engine from calculating too long, ...
E_ple's user avatar
  • 35
3 votes
2 answers
264 views

Chess symbols aren't displaying in command prompt

I'm trying to make a 2-player Chess game in C that would work simply in terminal. I had a lot of problems with fonts, so I just found a good looking (most importantly - monospaced) font and just added ...
VasyaDryashkaba's user avatar
0 votes
1 answer
69 views

Stockfish returning only one move when used with Symfony Process

I have this code which returns the best move using Stockfish Engine. I provide it with a skill level for the engine and the fen string of the position and it should return the best move. <?php ...
danilovict2's user avatar
1 vote
0 answers
149 views

How to test and assert my chess engine's Elo using Stockfish?

I have developed a chess engine in C# and I want to estimate its Elo rating by playing it against Stockfish, a well-known and highly-rated chess engine. My goal is to set up matches between my engine ...
Vũ Hoàng's user avatar
0 votes
1 answer
309 views

Unable to screen record my game while playing online on chess.com mobile app on Galaxy S23 Ultra [closed]

When I try to screen record my game while playing online on chess.com mobile app it does not record the screen. When I checked the recording it shows only black screen. I am using Galaxy S23 Ultra's ...
Puneet Pant's user avatar
2 votes
1 answer
107 views

in c: my special free function refuses to work

A function that returns a 2D list of pointers to every possible knight movements on a grid. Everything works except my spacial free function that crashes in random locations: Unhandled exception at ...
yuval gabay's user avatar
1 vote
1 answer
46 views

GameObject not being created when giving transform a parent Unity

I am making chess in unity2D and am trying to set the pieces as children of the squares as shown in the function below, however it is not creating new game objects with no errors being output. private ...
ReuJDon's user avatar
  • 45
0 votes
1 answer
102 views

Having issues with chess.js, valid moves are not being displayed via socket.io after reloading an in-progress game

I'm writing a multiplayer chess app using chess.js, react-chessboard, socket.io, and React that should allow users to play chess with each other and store the history of the games. I've gotten it to ...
smc's user avatar
  • 1
-1 votes
1 answer
87 views

Making a separated thread for a long-running task [closed]

I'm working on my little chess engine in C#, and I want to make my search function run in the background. (so that the UI is still interactable) I checked some other stackoverflow solutions talking ...
E_ple's user avatar
  • 35
0 votes
0 answers
112 views

Is there a way to keep track of the sequence of moves in my chess engine

I have my chess engine, and while it is searching, I want it to keep track of the best move of the current position and the sequence of the follow-up moves. Getting the best move for the current ...
E_ple's user avatar
  • 35
1 vote
1 answer
109 views

How to run two executables and communicate with them separately in C++? [closed]

I am coding a chess engine in C++. This engine uses the universal chess interface (UCI). This means I can communicate with it via the console. I type some command in the console and it responds in the ...
schiss3000's user avatar
0 votes
1 answer
48 views

Python Chess Engine: How do I replace the piece thats on the inputted square with a "#"?

When the user inputs a coordinate like "a1", I want to find the piece that is on that square and replace its icon with a "#" character and render the new board. So the rook in the ...
MrGill's user avatar
  • 1
0 votes
0 answers
29 views

Three.js checkers game

I am in very early stages of making a Three.js checkers game. I have the board made, and now i want to put the board on top of a table, how can I do it? Here is my code so far. (the comments are in ...
mjk1906's user avatar
0 votes
0 answers
117 views

How to Implement Transposition Tables with Alpha-Beta Pruning in a Minimax Search

I'm programming a chess engine, and recently I've been trying to implement transposition tables into my minimax algorithm. Before I added transposition tables, the minimax ran perfectly with alpha-...
Jack Newport's user avatar
0 votes
0 answers
189 views

Why am I getting a "Connection Refused" Error [Errno 61] in my client-server code?

I'm trying to create a chess game in Python using Sublime Text. I have a class called Player that first shows a Tkinter entry box to enter your player alias. When the user enters their alias and ...
user24889088's user avatar
0 votes
0 answers
73 views

Storing piece attacks for bitboards

I know that to store the knight's attacks for example I begin by initializing an array of 64 uint64s representing all the possible knight attacks and fill it up then whenever I need the move of a ...
ns8's user avatar
  • 1
2 votes
0 answers
81 views

chess endgame engine is not working completely correctly

I have proceeded a bit with my goal to obtain a chess-game endgame engine where both players would play fully optimally while there are D<5 pieces on the board so that I can wait for the result.The ...
user22758952's user avatar
2 votes
1 answer
44 views

Quiescense search problems

Im currently working on a chess engine in python using the chess library. I have attempted to implement a quiescense search by using the pseudocode from the chess programming wiki, but once I run the ...
Beeri Levinger's user avatar
0 votes
0 answers
77 views

Fix Alpha-Beta Pruning in Chess Negamax Algorithm

I've made a decently simple chess engine so far and I'm running into a problem related to the chess engine thinking it found mate and playing those moves despite it not having a forced mate. This ...
user24551772's user avatar

1
2 3 4 5
30