Skip to content
Discussion options

You must be logged in to vote

Implement ten hooks on inferfarm::GameAdapter. The full Gomoku adapter is ~200 lines (examples/gomoku/gomoku_adapter.h). The skeleton:

struct MyGame : inferfarm::GameAdapter {
    void NewGame(uint64_t seed, bool we_first) override;   // reset cleanly = determinism
    bool AdvanceToDecision() override;                     // run to your next decision point
    void AssembleInto(inferfarm::SlotWriter& slot) override;  // write features into the slot row (zero-copy)
    int  CollectOutputs(inferfarm::OutputDest* d, int cap) override;
    void ApplyResult() override;                           // consume outputs, advance the game
    bool IsDone() override;  int Outcome() override;       // …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SkYContact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant