Search in sources :

Example 1 with TableDrivenAgentProgram

use of aima.core.agent.impl.aprog.TableDrivenAgentProgram in project aima-java by aimacode.

the class TableDrivenAgentProgramTest method setUp.

@Before
public void setUp() {
    Map<List<Percept>, Action> perceptSequenceActions = new HashMap<List<Percept>, Action>();
    perceptSequenceActions.put(createPerceptSequence(new DynamicPercept("key1", "value1")), ACTION_1);
    perceptSequenceActions.put(createPerceptSequence(new DynamicPercept("key1", "value1"), new DynamicPercept("key1", "value2")), ACTION_2);
    perceptSequenceActions.put(createPerceptSequence(new DynamicPercept("key1", "value1"), new DynamicPercept("key1", "value2"), new DynamicPercept("key1", "value3")), ACTION_3);
    agent = new MockAgent(new TableDrivenAgentProgram(perceptSequenceActions));
}
Also used : MockAgent(aima.test.core.unit.agent.impl.MockAgent) NoOpAction(aima.core.agent.impl.NoOpAction) Action(aima.core.agent.Action) DynamicAction(aima.core.agent.impl.DynamicAction) DynamicPercept(aima.core.agent.impl.DynamicPercept) Percept(aima.core.agent.Percept) DynamicPercept(aima.core.agent.impl.DynamicPercept) HashMap(java.util.HashMap) TableDrivenAgentProgram(aima.core.agent.impl.aprog.TableDrivenAgentProgram) ArrayList(java.util.ArrayList) List(java.util.List) Before(org.junit.Before)

Aggregations

Action (aima.core.agent.Action)1 Percept (aima.core.agent.Percept)1 DynamicAction (aima.core.agent.impl.DynamicAction)1 DynamicPercept (aima.core.agent.impl.DynamicPercept)1 NoOpAction (aima.core.agent.impl.NoOpAction)1 TableDrivenAgentProgram (aima.core.agent.impl.aprog.TableDrivenAgentProgram)1 MockAgent (aima.test.core.unit.agent.impl.MockAgent)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Before (org.junit.Before)1