MCPcopy Create free account
hub / github.com/BindsNET/bindsnet / run_pipeline

Function run_pipeline

examples/breakout/breakout_stdp.py:56–69  ·  view source on GitHub ↗
(pipeline, episode_count)

Source from the content-addressed store, hash-verified

54
55
56def run_pipeline(pipeline, episode_count):
57 for i in range(episode_count):
58 total_reward = 0
59 pipeline.reset_state_variables()
60 is_done = False
61 while not is_done:
62 result = pipeline.env_step()
63 pipeline.step(result)
64
65 reward = result[1]
66 total_reward += reward
67
68 is_done = result[2]
69 print(f"Episode {i} total reward:{total_reward}")
70
71
72# enable MSTDP

Callers 1

breakout_stdp.pyFile · 0.85

Calls 3

env_stepMethod · 0.80
reset_state_variablesMethod · 0.45
stepMethod · 0.45

Tested by

no test coverage detected