-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathEnvironment.cs
122 lines (108 loc) · 3.18 KB
/
Environment.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
using System;
using System.Collections.Generic;
namespace aima.core.agent
{
/**
* An abstract description of possible discrete Environments in which Agent(s)
* can perceive and act.
*
* @author Ravi Mohan
* @author Ciaran O'Reilly
* @author Mike Stampone
*/
public interface Environment
{
/**
* Returns the Agents belonging to this Environment.
*
* @return The Agents belonging to this Environment.
*/
List<Agent> getAgents();
/**
* Add an agent to the Environment.
*
* @param agent
* the agent to be added.
*/
void addAgent(Agent agent);
/**
* Remove an agent from the environment.
*
* @param agent
* the agent to be removed.
*/
void removeAgent(Agent agent);
/**
* Returns the EnvironmentObjects that exist in this Environment.
*
* @return the EnvironmentObjects that exist in this Environment.
*/
List<EnvironmentObject> getEnvironmentObjects();
/**
* Add an EnvironmentObject to the Environment.
*
* @param eo
* the EnvironmentObject to be added.
*/
void addEnvironmentObject(EnvironmentObject eo);
/**
* Remove an EnvironmentObject from the Environment.
*
* @param eo
* the EnvironmentObject to be removed.
*/
void removeEnvironmentObject(EnvironmentObject eo);
/**
* Move the Environment one time step forward.
*/
void step();
/**
* Move the Environment n time steps forward.
*
* @param n
* the number of time steps to move the Environment forward.
*/
void step(int n);
/**
* Step through time steps until the Environment has no more tasks.
*/
void stepUntilDone();
/**
* Returns <code>true</code> if the Environment is finished with its current
* task(s).
*
* @return <code>true</code> if the Environment is finished with its current
* task(s).
*/
bool isDone();
/**
* Retrieve the performance measure associated with an Agent.
*
* @param forAgent
* the Agent for which a performance measure is to be retrieved.
* @return the performance measure associated with the Agent.
*/
double getPerformanceMeasure(Agent forAgent);
/**
* Add a view on the Environment.
*
* @param ev
* the EnvironmentView to be added.
*/
void addEnvironmentView(EnvironmentView ev);
/**
* Remove a view on the Environment.
*
* @param ev
* the EnvironmentView to be removed.
*/
void removeEnvironmentView(EnvironmentView ev);
/**
* Notify all registered EnvironmentViews of a message.
*
* @param msg
* the message to notify the registered EnvironmentViews with.
*/
void notifyViews(String msg);
}
}