@@ -67,17 +67,17 @@ def display(self, canvas, x, y, width, height):
67
67
68
68
69
69
class Agent (Thing ):
70
- """An Agent is a subclass of Thing with one required slot,
71
- .program, which should hold a function that takes one argument, the
72
- percept, and returns an action. (What counts as a percept or action
70
+ """An Agent is a subclass of Thing with one required instance attribute
71
+ (aka slot), .program, which should hold a function that takes one argument,
72
+ the percept, and returns an action. (What counts as a percept or action
73
73
will depend on the specific environment in which the agent exists.)
74
- Note that 'program' is a slot, not a method. If it were a method,
75
- then the program could 'cheat' and look at aspects of the agent.
76
- It's not supposed to do that: the program can only look at the
77
- percepts. An agent program that needs a model of the world (and of
78
- the agent itself) will have to build and maintain its own model.
79
- There is an optional slot, . performance, which is a number giving
80
- the performance measure of the agent in its environment."""
74
+ Note that 'program' is a slot, not a method. If it were a method, then the
75
+ program could 'cheat' and look at aspects of the agent. It's not supposed
76
+ to do that: the program can only look at the percepts. An agent program
77
+ that needs a model of the world (and of the agent itself) will have to
78
+ build and maintain its own model. There is an optional slot, .performance,
79
+ which is a number giving the performance measure of the agent in its
80
+ environment."""
81
81
82
82
def __init__ (self , program = None ):
83
83
self .alive = True
0 commit comments