To troubleshoot errors in your simulation, it's helpful to audit the data passed to the Pathmind Helper.

Printing Debug Information 

Inside the Pathmind Helper properties, select "Debug Mode" to print debug information. 

From there, run your AnyLogic simulation and open up the AnyLogic console.

Inside the console, the Pathmind Helper will print the following information each time an agent performs an action. Inspect this to troubleshoot errors in your simulation. 

Step: 1
Array: {stateChartState[0]=1.0, stateChartState[1]=0.0, stateChartState[2]=0.0}
Number of Observations: 3
Array: {goalReached=0.0}
Number of Metrics: 1
Last Action: [0.0]
Done: false


Step - The step associated with each action. Every time an action is triggered, the step count is incremented.

Observations -  Output of the observations array at each step. Audit these values to confirm that observations are computed correctly. 

Reward Variables -  Output of the rewards array at each step. Audit these values to confirm that rewards are computed correctly.

Last Action -  The last action taken.

Done - Resolves to true  or false. Indicates whether or not an episode has completed.

Did this answer your question?