Code Monkey home page Code Monkey logo

Comments (5)

rosenthj avatar rosenthj commented on August 17, 2024

I need to update my training script so you can use these!

Essentially those three files contain the dynamic features, game result and static features of your dataset and are coupled so line# N is from the same sample in each file.
Static features are essentially 8x8xC representations of the boards more static features. At the moment these are specifically the locations of the pawns and kings. ome constant helper channels are assumed and added by the model, but not stored here. These are inputs for a CNN.
Dynamic features are the features more usually found in classical engines. E.g. how many squares a piece may or may not be able to reach.
Game result is represented as whether the player to move won or did not lose respectively. Full WDL can be inferred from these two features.

After the training script is updated it should be pretty straightforward to run these files through the script. At the end of the training script the header files for the hardcoded NN weights are generated that you can recompile Winter with.
This last part is kind of hacky and I will need to change if people start training their own networks, but so far you seem to be the first that tried.

The repository with the training script is the following: https://github.com/rosenthj/WinterTraining

from winter.

tpl avatar tpl commented on August 17, 2024

ok, thanks for answer.

from winter.

rosenthj avatar rosenthj commented on August 17, 2024

Wanted to update here with my current plans.

At the moment training is quite awkward for people other than me and I am aware of this. Part of the reason is a bit deliberate as I don't want people wasting too much time before I have come up with a more sustainable solution as the net is hardcoded into the codebase. What this means is that if I update the architecture of the net, any networks previously trained are no longer compatible.

I have a couple things planned to help remedy this issue.

  1. One change I have in mind is that the training script will not just generate the training weights, but will also generate the source and header files for the NN evaluation. This will mean if you train a net with one version of Winter, you can always use it with a newer version as well. The whole approach still feels like a bit of a hack though, so many people will prefer to take advantage of the next point.
  2. I intend to support NNUE networks. Its important to understand that this does not mean I will support NNUE (though I might), just that the network architecture might receive permanent support. This is much easier to do than just supporting general ONNX based neural networks and allows some interaction with other projects, as well as removing reliance on the Winter codebase for people interested in training networks. The main reason I am not necessarily going to fully support and use NNUE in Winter is that I feel a lot of projects will be doing that, so focusing on NNUE might make Winter less unique and interesting in the future.
  3. I would like to update the training script to directly accept a file with EPDs. I suspect for the moment the primary difficulty for people interested in training networks is the lack of documentation coupled with the unclear pipeline. Having the training script be completely end to end would mitigate this problem greatly.

from winter.

sugizo avatar sugizo commented on August 17, 2024

tested learning feature using Winter on mac
build

cd ~/Downloads
git clone https://github.com/rosenthj/Winter
cd Winter
make

1st trial

~/pgn-extract/pgn-extract -s -C -N -V -D -M -Wuci --notags -o ~/winter/eval ~/pgn/merge_cql_extract_fix/mate.pgn
cd ~/winter
./Winter gen_eval_csv ./eval ./dataset

result
nothing happen

2nd trial

~/pgn-extract/pgn-extract -s -C -N -V -D -M -Wuci --notags -o ~/winter/eval ~/pgn/merge_cql_extract_fix/mate.pgn
cd ~/winter
./Winter 
gen_eval_csv ./eval ./dataset

result
Command not supported in this build. Recompile with -DEVAL_TRAINING

question
how to use learning feature using winter ?

from winter.

rosenthj avatar rosenthj commented on August 17, 2024

As of Winter 1.0, this is no longer the approach used to train Winter nets. I will at some point make an update, but the new way will not require directly using Winter. Instead there will be a python script.

from winter.

Related Issues (18)

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.