/
Agent.cs
43 lines (40 loc) · 1.09 KB
/
Agent.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
using System;
using System.Collections;
namespace aima.core.agent
{
/**
* Artificial Intelligence A Modern Approach (3rd Edition): Figure 2.1, page 35.<br>
*
* Figure 2.1 Agents interact with environments through sensors and actuators.
*
* @author Ravi Mohan
* @author Ciaran O'Reilly
*/
public interface Agent : EnvironmentObject
{
/**
* Call the Agent's program, which maps any given percept sequences to an
* action.
*
* @param percept
* The current percept of a sequence perceived by the Agent.
* @return the Action to be taken in response to the currently perceived
* percept.
*/
Action execute(Percept percept);
/**
* Life-cycle indicator as to the liveness of an Agent.
*
* @return true if the Agent is to be considered alive, false otherwise.
*/
bool isAlive();
/**
* Set the current liveness of the Agent.
*
* @param alive
* set to true if the Agent is to be considered alive, false
* otherwise.
*/
void setAlive(bool alive);
}
}