Skip to content

Instantly share code, notes, and snippets.

@heyswappy
Created April 11, 2019 10:51
Show Gist options
  • Save heyswappy/b0680103eb660e15349ce7e72b64fff1 to your computer and use it in GitHub Desktop.
Save heyswappy/b0680103eb660e15349ce7e72b64fff1 to your computer and use it in GitHub Desktop.
"""the following is vague implementation of an algorithms from aima
https://github.com/aimacode/aima-pseudocode/blob/master/md/Table-Driven-Agent.md"""
percept_queue = [] # percept queue for static variable implementation
table = {} # dictionay aka hashtable
def table_driven_agent(percept):
global percept_queue
global table
percept_queue.append(percept)
action = table[percepts]
return action
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment