Model Initialization
Demo
const { AgentFactory } = require('nrn-agents');
const modelData = {
config: {
modelType: "neural-network", // Type of model architecture
inputDim: 5, // Number of features for the state
neurons: [12, 6], // Number of neurons in each layer
actionOrder: ["up", "down", "idle"] // Order of action outputs
}
}
const agent = AgentFactory.createDemoAgent(modelData)using NrnAgents.Agents;
using NrnAgents.MachineLearning;
ModelData modelData = new ()
{
Config = new ()
{
ModelType = "neural-network",
NFeatures = 5,
Neurons = new List<int> () { 12, 6 },
ActionMetadata = MetadataCreation.CreateActionMetadata(
new AgentActions () {
ActionOrder = new () { "Up", "Down", "Idle" }
}
)
}
};
DemoAgent Agent = AgentFactory.CreateDemoAgent(modelData);Production
Last updated