All Downloads are FREE. Search and download functionalities are using the official Maven repository.

aima.core.environment.vacuum.VacuumEnvironmentViewActionTracker Maven / Gradle / Ivy

Go to download

AIMA-Java Core Algorithms from the book Artificial Intelligence a Modern Approach 3rd Ed.

The newest version!
package aima.core.environment.vacuum;

import aima.core.agent.Action;
import aima.core.agent.Agent;
import aima.core.agent.Environment;
import aima.core.agent.EnvironmentView;

public class VacuumEnvironmentViewActionTracker implements EnvironmentView {
	private StringBuilder actions = null;

	public VacuumEnvironmentViewActionTracker(StringBuilder envChanges) {
		this.actions = envChanges;
	}

	//
	// START-EnvironmentView
	public void notify(String msg) {
		// Do nothing by default.
	}

	public void agentAdded(Agent agent, Environment source) {
		// Do nothing by default.
	}

	public void agentActed(Agent agent, Action action, Environment source) {
		actions.append(action);
	}

	// END-EnvironmentView
	//
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy