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

burlap.mdp.core.state.NullState Maven / Gradle / Ivy

Go to download

The Brown-UMBC Reinforcement Learning and Planning (BURLAP) Java code library is for the use and development of single or multi-agent planning and learning algorithms and domains to accompany them. The library uses a highly flexible state/observation representation where you define states with your own Java classes, enabling support for domains that discrete, continuous, relational, or anything else. Planning and learning algorithms range from classic forward search planning to value-function-based stochastic planning and learning algorithms.

The newest version!
package burlap.mdp.core.state;

import burlap.mdp.core.state.annotations.ShallowCopyState;

import java.util.ArrayList;
import java.util.List;

/**
 * A null state that contains no information. Access it via the singleton {@link #instance} field.
 */
@ShallowCopyState
public final class NullState implements State{

	public final static NullState instance = new burlap.mdp.core.state.NullState();

	private NullState(){}

	@Override
	public List variableKeys() {
		return new ArrayList();
	}

	@Override
	public Object get(Object variableKey) {
		return null;
	}

	@Override
	public State copy() {
		return this;
	}

	@Override
	public boolean equals(Object obj) {
		return obj instanceof burlap.mdp.core.state.NullState;
	}

	@Override
	public int hashCode() {
		return 0;
	}

	@Override
	public String toString() {
		return "";
	}
}