Polarith AI
1.8

◆ Performance

Determines the optimization method to be used for agent updates.

This setting affects both multithreaded and non-multithreaded agents.

PerformanceType.Synchronous: All AIMContext.PrepareEvaluation and AIMContext.ObtainEvaluatedResults calls are done on the main thread with the given UpdateFrequency. For non-multithreaded agents, the Context.Evaluate method is processed on the main thread as well. For multithreaded agents, Context.Evaluate is distributed over the available Threads.

PerformanceType.Asynchronous: Affects multithreaded agents only and has the same effect as PerformanceType.Synchronous for non-multithreaded agents. For multithreaded agents, the AIMContext.PrepareEvaluation and AIMContext.ObtainEvaluatedResults methods are updated asynchronously. Hence, the main thread does not wait for sub-threads to be finished before the application update continues.

PerformanceType.LoadBalanced: Agent updates are distributed equally over the frame updates depending on the set TargetFps and UpdateFrequency. For example, consider a frequency of 1 (one update per second), a target FPS of 60 and 120 agents: Instead of having one large update with 120 agents only 2 agents are processed each update (120/60 = 2). This applies for both multithreaded and non-multithreaded agents. For multithreaded agents, only the AIMContext.PrepareEvaluation and AIMContext.ObtainEvaluatedResults are distributed since they are on the main thread (also, this implies that the updates are done asynchronously).

Imprint