Skip to content

search algorithms outside classes ? #32

Description

@GoogleCodeExporter
Hi,
I'm currently trying to code algorithms provided in AIMA, but I don't 
understand why the Agent class isn't used in chapter 3 and 4, where agent 
programs are implemented as functions outside classes, and not as Agent's 
methods.
For instance, instead of "def SimpleReflexAgentProgram(rules, 
interpret_input):", why not 
class SimpleReflexAgent(Agent):
     def __init__(self, rules):
     ...      
         def simple_reflex_agent_program(percept):
             ...
         Agent.__init__(self, simple_reflex_agent_program)

I guess there's a good reason for that, because previous versions of the code 
were actually doing that. Could someone please explain to me ?

Original issue reported on code.google.com by tournev...@gmail.com on 19 Jul 2012 at 12:23

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions