Agent training problems
Before we get into the more advanced techniques used inside Unity's training scripts, we want to understand a little more about how an agent's training can break. Let's open Unity back up to where we left off in the last chapter and see how easily we can break an agent's training using the following steps:
- Open Unity to the
GridWorld
example exercise. If you need help with this, return to the last chapter and review the exercises. - Locate the
GridAcademy
object and component in theInspector
window and set the values as shown in the following excerpt:

Setting the parameters for the grid example
- Set the
gridSize
to20
,numObstacles
to10
, andnumGoals
to1
, as shown in the preceding screenshot.
- Set the
GridWorldBrain
to use aPlayer
orHeuristic
brain. - Press Play to run the sample, and look at the game. You should notice a much larger grid with plenty of extra obstacles. If you set the brain to
Player
, go ahead and play the game a couple times. Chances are you will run out...