Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
79 views

<line fen="rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"> <move m="e4"/> <move m="e5"/> <move m="d4"/> <...
Ildar's user avatar
  • 11
1 vote
0 answers
111 views

All versions are up to date: Windows 11, Python 3.13.5, Jupyter: IPython : 9.4.0 ipykernel : 6.30.0 ipywidgets : not installed jupyter_client : 8.6.3 jupyter_core : 5.8.1 ...
Google Gauner's user avatar
0 votes
1 answer
67 views

When i tried this code in my main project to get infinite analysis in my chess GUI (I wanted the engine to think infinitely about a position and give its data (score, best move, etc..) and no depth or ...
eyad said's user avatar
2 votes
1 answer
171 views

I wrote my chess openings database using python chess lib and now I'm trying to use it as an api on a website to determine the position name. But python chess and chessjs use different methods to ...
Eblo's user avatar
  • 11
1 vote
1 answer
263 views

I have a working 1600 blitz level bot but it works too slow in python using python chess library. I tried to optimize the functions in eval function but the best it can do is depth 4 since it takes a ...
mark's user avatar
  • 93
-1 votes
1 answer
78 views

I have made a simple chess GUI with tkinter. Now I want to add a clock for each player. The clock is displayed in a label's text. It works in human player's turn. The time changes every second. When ...
user28471654's user avatar
1 vote
1 answer
269 views

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
2 votes
3 answers
270 views

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
253 views

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
-5 votes
1 answer
48 views

I made python project for my university. It is kinda big, has stockfish in its content How can i make an exe game? I tried auto-to-py exe and it didt work (maybe because of this PyTask_chess/PyTask/...
Fridmak's user avatar
-1 votes
1 answer
51 views

I am trying to make a chess game that can be ran on terminal and a variable that should have a value doesn't have a value and i don't know what is that cousing the problem I want to make a chess ...
mami yt 404's user avatar
0 votes
1 answer
65 views

I'm trying to use the python-chess library to interface with Stockfish on macOS, but I'm encountering a TimeoutError during the initialization process. Here's a simplified version of my code: import ...
klooth's user avatar
  • 534
0 votes
0 answers
122 views

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
0 votes
1 answer
60 views

My model was trained off of thousands of FENs which are simply chess positions and the move that was played as a response to that chess position. The model should output a predicted move in response ...
MessiSkillz's user avatar
0 votes
1 answer
67 views

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
68 views

Hello I am trying to display a chess board and when I get to the create_image part I am getting the following issue: Exception has occurred: TclError image "pyimage1" doesn't exist File &...
Христо Иванов's user avatar
2 votes
0 answers
111 views

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
84 views

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
1 answer
197 views

I am attempting to build a chess bot which learns using Proximal Policy Optimization. I am currently using the python-chess library (https://python-chess.readthedocs.io/en/latest/index.html#) as the ...
Unknown Unknown's user avatar
4 votes
0 answers
464 views

I'm trying to create a code for perfectly optimal chess endgame. By that I mean that the loosing player tries to delay the checkmate as long as possible while the winning tries to checkmate the ...
user22758952's user avatar
0 votes
0 answers
170 views

I have forked code from GitHub that provided about Play online chess with real chess board. But I found the error below: Traceback (most recent call last): File "board_calibration.py", ...
Veerasaroot Bunkangwan's user avatar
0 votes
0 answers
81 views

Can you fulfill all these 13 points at simultaneously: chess endgame: a problem with propagation upwards for a fully optimal game I do not know what to add so that my question would become accepted ...
user22758952's user avatar
1 vote
0 answers
50 views

I'm trying to make my code in Python to solve correctly the Reti endgame by pushing Kh8 to Kg7, which is the only move leading to a draw for white. However the code given below keeps saying Positions ...
user22758952's user avatar
1 vote
1 answer
235 views

I'm trying to create an endgame chess engine fully on my own and in Python. I'm keeping getting an error as below. I'm unable to get rid of it. Can someone kindly fix it or give me a hint how to fix ...
user22758952's user avatar
0 votes
1 answer
163 views

I was using ChatGPT4 for creating a chess code for the problem stated below, but mostly I was not obtaining any results beyond "depth 0 up to depth 19" with the number of positions searched....
user22758952's user avatar
0 votes
0 answers
85 views

I wrote two codes, one of which generates random moves, evaluates them with Stockfish, and then trains them to create a model. Other code for using this model and playing with it. import chess import ...
Stallion77's user avatar
0 votes
0 answers
248 views

I'm trying to get position evaluation using Stockfish on python-chess. From a total of 1 million FEN position, Stockfish will return the score. However, after the 25430th position (oddly specific), ...
Darwish's user avatar
  • 49
2 votes
0 answers
127 views

I have the following backtracking solution to chess endgames with D=3 figures on the board. I should have obtained white king to move on Kc2, but I'm getting Qh3h8. I have printed the print(board....
user22758952's user avatar
0 votes
0 answers
135 views

I'm currently trying to create a program using Python-Chess that will analyse games for me, and give a list of best, and second best moves. Even though lichess.org and chess.com have good UI for this, ...
Oscar Oak Soe Aung's user avatar
0 votes
1 answer
130 views

when I get out of book in my chess engine, it is returning none. import random import chess import chess.polyglot import time from evaluate import * max_depth = 18 move_points = [] def nextMove(...
mishari alhussain's user avatar
1 vote
0 answers
71 views

I have this simple code using Python that will allow me to play chess against Stockfish. I also implemented a simple GUI that helps visualize the pieces easier. I have name the black pieces images &...
Ineedhelpwithpython's user avatar
0 votes
1 answer
330 views

I am trying to evaluate a FEN position with stockfish. Given this position: rnbqkbnr/pppp1p1p/8/4p3/P3P1p1/5N2/1PPP1PPP/RNBQKB1R b KQkq - 0 4 and stockfish 16. This is the position board picture: I ...
neo's user avatar
  • 3
1 vote
1 answer
136 views

I am currently working on a personal project and utilizing the chessdotcom Public API Package. I am currently able to store in a variable the PGN from the daily puzzle (Portable Game Notation) which ...
Pandyy21's user avatar
0 votes
0 answers
100 views

I’m in the beginnings of creating a chess engine written in python and I was wondering of ways to improve the move generation part. Generating pseudo-legal moves I can do about 30/40 K moves/s on my ...
Federico's user avatar
0 votes
3 answers
656 views

I’ve written a chess software in Python which use Stockfish via this library: https://pypi.org/project/stockfish/ The software works and plays well. Too well actually… Mi idea was the app can offer a ...
igoemon's user avatar
  • 305
0 votes
0 answers
183 views

I'm trying to make a simple chess AI in python but when I try to play a game using this algorithm to find the best move it outputs the same thing every time (Nh6, Rg8, Rh8, Rg8...). # Minimax ...
Hello's user avatar
  • 1
-1 votes
1 answer
157 views

I am currently working on a chess engine, and I am looking at parallelization as a way to optimize the time it takes to search legal moves to find the best one. I found the Python module ...
user avatar
0 votes
1 answer
88 views

I need help setting up the write logic for the winning condition "The game end when either player's king reaches row 8, unless it is white's turn and black's king is in row 7, then black has one ...
Kevin Mai's user avatar
1 vote
0 answers
149 views

I've been trying to make a custom python engine, that uses UCI protocol to communicate it's moves. I'm able to understand how the UCI protocol works, but I don't understand how to make my python ...
sub2nullexception's user avatar
1 vote
1 answer
102 views

I am trying to make a chess Minimax algorithm. However, I encountered a problem. This is my code: import random import itertools from chess import Board, Move, LegalMoveGenerator def ...
hakdjhfkajhfe's user avatar
1 vote
0 answers
151 views

I'm currently working to improve a chess engine in python. more specifically I'm working on the move generation of sliding pieces, like rooks and bishops. originally I used this loop function for both ...
Smillyone's user avatar
0 votes
1 answer
331 views

So I was just messing around with the stockfish library and am converting the moves to a PGN text format and errored parsing the move Right now every move comes in this format "a1b2" and I'm ...
ReliableAirRepair's user avatar
1 vote
0 answers
48 views

I am seeing that negamax is often used for chess engines.However there is only popular instances of it being used in the conventional game.Is negamax good for the variants of chess like bughouse or is ...
Sriram Sundararajan's user avatar
0 votes
1 answer
233 views

As someone who is relatively new to coding, I am trying to create my own chess game. Currently, I am facing a challenge in attempting to make my buttons invisible while still allowing them to execute ...
mark thounskane's user avatar
1 vote
1 answer
456 views

I trying to extract move information and annotations from a few PGN files, outputting to a text file. My current code is: import chess.pgn import io import os def handle_san_error(pgn_file, game_str, ...
Dominic Matthews's user avatar
-1 votes
1 answer
288 views

I'm trying to start the Stockfish module in Python as the black player instead of the default white. I've been looking for parameters or other information on how to do this, but haven't been able to ...
david genkin's user avatar
1 vote
1 answer
158 views

This is my search function for python chess engine: def search(pos: position.Position, depth: int, alpha: int, beta: int, side_to_move: chess.Color, root: bool = False): global nodes, best_score, ...
Boo Who's user avatar
  • 17
-2 votes
1 answer
261 views

In a chess position, I wish to check whether any passed pawn exists for white. Is it possible to do so using the python-chess library? If not, how can I implement it? def checkForPassedPawn(position: ...
Boo Who's user avatar
  • 17
0 votes
1 answer
105 views

I am attempting to create a chess GUI. I was able to make it so that when the player is White, everything loads perfectly. However, when I try to load when the player is Black, it does not load ...
Hantalyte's user avatar
1 vote
2 answers
869 views

I am making a chess game in Python with PyGame using the python-chess library. When I implement my program in PyGame the window only shows the empty board without the pieces. However, if I manually ...
Rey Fit's user avatar
  • 15