Skip to content

Instantly share code, notes, and snippets.

@johnmaxwelliv
Created February 13, 2013 03:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnmaxwelliv/4942090 to your computer and use it in GitHub Desktop.
Save johnmaxwelliv/4942090 to your computer and use it in GitHub Desktop.
metaknowledge = .1
cognition = .2
time = 100
steps_per_unit_time = 4
for i in range(time * steps_per_unit_time):
if i % steps_per_unit_time == 0:
print("At t = %d, cognition is %.2f and metaknowledge is %.2f." % (i / steps_per_unit_time, cognition, metaknowledge))
d_metaknowledge = .2 * metaknowledge * cognition
d_cognition = .2 * metaknowledge * cognition
metaknowledge += d_metaknowledge * 1.0 / steps_per_unit_time
cognition += d_cognition * 1.0 / steps_per_unit_time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment