For the complete documentation index, see llms.txt. This page is also available as Markdown.

Agent Wrappers

const agentConfig = {
  numSamples: { direction: 4 },
  holdActions: ["up", "down"],
  // forcedHold: 4
}

const model = new Model("nn-v1", "brandinho", 0, agentConfig, false, true)

This is the config structure:

{
    frameDelay: 0,
    forcedHold: 0,
    holdActions: 0,
    forceHoldActions: 0,
    numSamples: 1
}
private static AgentConfig _getAgentConfig()
{
    List<string> holdActions = new () { "up", "down" };
    List<string> forceHoldActions =  new ();
    Dictionary<string, int> numSamples = new () {{ "direction", 10 }};
    return new AgentConfig(15, 4, holdActions, forceHoldActions, numSamples);
}

private async Task _loadAgent()
{
    try
    {
        bool randomlyInitialize = false;
        ModelWrapper model = new ModelWrapper("nn-v1", "brandinho", 0);
        await model.InitializeModelData(randomlyInitialize);
        model.Collector.FrameInterval = 20;
        AgentArc = new ProbabilisticAgent(model, _getAgentConfig());
        ArcModelLoaded = true;
    }
    catch (System.Exception e)
    {
        Debug.LogError($"Error loading Arc Model: {e}");
    }
}

This is the config definitions