You may notice training progress extremely slowly (or not progress at all) and ultimately, error out after an hour. This means that the experiment has stalled. Pathmind automatically ends training if no progress is made within one hour.

Typically, training can stall and time out for two reasons.

1. No actions are triggered

To check if this is the problem, run your AnyLogic model using debug mode. Make sure Pathmind is enabled, and make sure actions are being triggered.

2. Your AnyLogic model executes too slow.

To determine how fast your simulation will run in Pathmind, run a 100-iteration Monte Carlo experiment (or a Parameter Variation experiment if you do not have access to a Monte Carlo experiment). Reinforcement learning is mechanically similar to a Monte Carlo so this will reveal any issues.

If it takes longer than a couple of minutes, then your simulation is probably too slow to train a reinforcement learning policy. You will need to resolve this problem to continue using Pathmind.

Typically, the bottleneck may be a function in your AnyLogic simulation (e.g. distanceByRoute() which requires a lot of computations). To identify the line of code that is causing issues, you must use a Java profiler such as VisualVM. Please watch this YouTube tutorial for guidance:

Did this answer your question?