Giter VIP home page Giter VIP logo

Comments (8)

SebLague avatar SebLague commented on July 26, 2024 2

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.

iamthetoaster avatar iamthetoaster commented on July 26, 2024

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.

iamthetoaster avatar iamthetoaster commented on July 26, 2024

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.

EikeSchwass avatar EikeSchwass commented on July 26, 2024

I'm also curious about this. It's a quite annoying that there appears to be no (allowed) board cloning support

from chess-challenge.

MinekPo1 avatar MinekPo1 commented on July 26, 2024

It seems like

new Board(board.board)

works.

from chess-challenge.

sten-code avatar sten-code commented on July 26, 2024

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.

ZEvanderKarl avatar ZEvanderKarl commented on July 26, 2024

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.

EikeSchwass avatar EikeSchwass commented on July 26, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.