package aima.agents; import java.util.*; /** The basic environment: the world in which agents and other things exist. */ public abstract class Environment { /** Build an environment with a given set of agents */ Environment(Agent[] agents) { this.agents = new Vector(); for(int i=0; i>> "+x);} /////////////// /** Run the environment for numSteps time steps. */ public Environment run(int numSteps) { for(; numSteps > 0 && !termination(); step++, numSteps--) { p("*** Step: " + step + "; "+agents.size()+" agents"); for(int i=0; i