-
Notifications
You must be signed in to change notification settings - Fork 794
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EnvironmentView interface renamed to EnvironmentListener, NQueensBoar…
…d cleaned up.
- Loading branch information
1 parent
c3708ef
commit 3a78145
Showing
40 changed files
with
268 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 46 additions & 47 deletions
93
...java/aima/core/agent/EnvironmentView.java → .../aima/core/agent/EnvironmentListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,46 @@ | ||
package aima.core.agent; | ||
|
||
/** | ||
* Allows external applications/logic to view the interaction of Agent(s) with | ||
* an Environment. | ||
* | ||
* @param <P> Type which is used to represent percepts | ||
* @param <A> Type which is used to represent actions | ||
* @author Ravi Mohan | ||
* @author Ciaran O'Reilly | ||
* @author Mike Stampone | ||
* @author Ruediger Lunde | ||
*/ | ||
public interface EnvironmentView<P, A> { | ||
/** | ||
* A simple notification message from an object in the Environment. | ||
* | ||
* @param msg | ||
* the message received. | ||
*/ | ||
void notify(String msg); | ||
|
||
/** | ||
* Indicates an Agent has been added to the environment and what it | ||
* perceives initially. | ||
* | ||
* @param agent | ||
* the Agent just added to the Environment. | ||
* @param source | ||
* the Environment to which the agent was added. | ||
*/ | ||
void agentAdded(Agent<?, ?> agent, Environment<?, ?> source); | ||
|
||
/** | ||
* Indicates the Environment has changed as a result of an Agent's action. | ||
* | ||
* @param agent | ||
* the Agent that performed the Action. | ||
* @param percept | ||
* the Percept the Agent received from the environment. | ||
* @param action | ||
* the Action the Agent performed. | ||
* @param source | ||
* the Environment in which the agent has acted. | ||
*/ | ||
void agentActed(Agent<?, ?> agent, P percept, A action, Environment<?, ?> source); | ||
} | ||
package aima.core.agent; | ||
|
||
/** | ||
* Allows applications to analyze and visualize the interaction of Agent(s) with an Environment. | ||
* | ||
* @param <P> Type which is used to represent percepts | ||
* @param <A> Type which is used to represent actions | ||
* @author Ravi Mohan | ||
* @author Ciaran O'Reilly | ||
* @author Mike Stampone | ||
* @author Ruediger Lunde | ||
*/ | ||
public interface EnvironmentListener<P, A> { | ||
/** | ||
* A simple notification message from an object in the Environment. | ||
* | ||
* @param msg | ||
* the message received. | ||
*/ | ||
void notify(String msg); | ||
|
||
/** | ||
* Indicates an Agent has been added to the environment and what it | ||
* perceives initially. | ||
* | ||
* @param agent | ||
* the Agent just added to the Environment. | ||
* @param source | ||
* the Environment to which the agent was added. | ||
*/ | ||
void agentAdded(Agent<?, ?> agent, Environment<?, ?> source); | ||
|
||
/** | ||
* Indicates the Environment has changed as a result of an Agent's action. | ||
* | ||
* @param agent | ||
* the Agent that performed the Action. | ||
* @param percept | ||
* the Percept the Agent received from the environment. | ||
* @param action | ||
* the Action the Agent performed. | ||
* @param source | ||
* the Environment in which the agent has acted. | ||
*/ | ||
void agentActed(Agent<?, ?> agent, P percept, A action, Environment<?, ?> source); | ||
} |
16 changes: 0 additions & 16 deletions
16
aima-core/src/main/java/aima/core/agent/EnvironmentViewNotifier.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package aima.core.agent; | ||
|
||
/** | ||
* @author Ciaran O'Reilly | ||
* @author Ruediger Lunde | ||
* | ||
*/ | ||
public interface Notifier { | ||
/** | ||
* A simple notification message, to be forwarded to someone. | ||
* | ||
* @param msg | ||
* the message to be forwarded. | ||
*/ | ||
void notify(String msg); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.