Comments (8)
Hi, I've added: public static Board CreateBoardFromFEN(string fen) to the board class in V1.1
Please note that this is quite slow, so I'd generally recommend using the MakeMove and UndoMove functions on the board provided in the think function instead.
from chess-challenge.
I just peered into the source code - might've been best to do that first! Looks like it is possible to construct a board from a FEN string, but not documented, so this is better described as a documentation issue than enhancement
from chess-challenge.
Whoops - it is not possible to construct a board from a FEN string using the allowed namespaces. Is there a reason for this?
from chess-challenge.
I'm also curious about this. It's a quite annoying that there appears to be no (allowed) board cloning support
from chess-challenge.
It seems like
new Board(board.board)
works.
from chess-challenge.
the thing i'm currently using is
public Board CopyBoard(Board board)
{
ChessChallenge.Chess.Board b = new ChessChallenge.Chess.Board();
b.LoadPosition(board.GetFenString());
return new Board(b);
}
But this technically isn't allowed. I think/hope Sebastian wouldn't care that much if thats the only thing you're using that for, because this one is basically required for any minimax algorithm.
from chess-challenge.
I would love to clone a board without having to write my own deep cloning method... definitely let us know if this is allowed!
from chess-challenge.
@sten-code you can work around that by always using pairs of MakeMove und UndoMove. MinMax often is implemented via recursion and works well in that case, but for many other cases it becomes a hassle really quickly
from chess-challenge.
Related Issues (20)
- board.cs has an error. HOT 4
- Significant performance boost to IsDraw method HOT 3
- Copying boards/overriding fen strings HOT 2
- Each character in string counts as token HOT 3
- Please select a valid startup item
- Black pawn appearing on h4
- Build errors when trying to run MyBot without changing anything from when downloading it. HOT 1
- Bot Brain Capacity change. HOT 2
- SquareIsAttackedByOpponent is returning true, although the square isn't attacked HOT 1
- Game over every time, even when MyBot won the round. HOT 6
- Final knockout tournament clarification HOT 2
- HOw to set custom Chess position to test bot HOT 2
- Run codes from strings in C# HOT 8
- Submission Deadline Clarification HOT 1
- [Critical Bug] The Token Counter is bugged HOT 5
- bot submission size limit issue HOT 1
- Is there any update on competition? HOT 14
- PGN parser
- Segmentation fault (core dumped) when launching Chess-Challenge v1.20 on Ubuntu 20.04 HOT 1
- Quitting unexpectedly on MacOs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chess-challenge.