UNPKG

arc-agents

Version:

A library for creating and deploying gaming agents at scale

44 lines (36 loc) 1.74 kB
import { ImitationLearningAgent } from './imitation-learning-agent'; import { ReinforcementLearningAgent } from './reinforcement-learning-agent'; import { DemoAgent } from './demo-agent'; import { AgentConfig, ModelData } from './agent-core'; /** Valid agent types offered through the SDK */ type AgentType = 'reinforcement' | 'imitation'; export declare class AgentFactory { /** Gets the api key for the agent vars class */ static getApiKey(): string; /** Gets the static game id for the agent vars class */ static getBackendUrl(): string; /** Sets the static game id for the agent vars class */ static setGameId(gameId: string): void; /** Sets the api key for the agent vars class */ static setApiKey(apiKey: string): void; /** Sets the authorization for the agent vars class */ static setAuthorization(authorization: string): void; /** * Creates an agent instance based on the provided agent type with full capabilities. * @param agentType - The type of agent to create. * @param args - Additional arguments to pass to the agent's constructor. * @returns An instance of the specified agent type. * @throws Will throw an error if the agent type is invalid. */ static createAgent( agentType: AgentType, ...args: any[] ): ImitationLearningAgent | ReinforcementLearningAgent; /** * Creates a demo instance for simple experimentation * @param modelData - Model data, which includes a mix of hyperparameters and parameters * @param agentConfig - Configuration options for the agent. * @returns An instance of a demo agent. */ static createDemoAgent(modelData: ModelData, agentConfig: AgentConfig): DemoAgent; }