social_learning.World.Reset C# (CSharp) 메소드

Reset() 공개 메소드

Resets the world by calling reset on each agents and plant, then generating a new layout for the plants.
public Reset ( ) : void
리턴 void
        public void Reset()
        {
            foreach (var agent in Agents)
            {
                agent.X = Width / 2;
                agent.Y = Height / 2;
                agent.Orientation = 0;
                agent.Fitness = 0;
            }

            layoutPlants();

            _step = 0;

            // Notify any listeners that the world stateActionPair has changed
            onChanged(EventArgs.Empty);
        }

Usage Example

예제 #1
0
 /// <summary>
 /// Reset the internal stateActionPair of the evaluation scheme if any exists.
 /// </summary>
 public void Reset()
 {
     _world.Reset();
 }