Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions example1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
class MyEnv(Model):
pass
class MyAgent(ACTR):
#production_time = 0.05
#production_sd = 0.01
#production_threshold = -20

goal = Buffer() # Creating the goal buffer for the agent

def init(): # this rule fires when the agent is instantiated.
goal.set("helloworld") # set goal buffer to direct program flow
def bread_bottom(goal="helloworld"): # if goal="sandwich bread" , fire rule
print ("Hello World!")
goal.set("stop") # set goal buffer to direct program flow
#def stop_production(goal="stop"):
#self.stop() # stop the agent

tim = MyAgent()
subway=MyEnv()
subway.agent=tim
log_everything(subway)
subway.run()