Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/system/learning ends before terminal #692

Merged
merged 7 commits into from
Mar 2, 2018
Merged
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
12 changes: 5 additions & 7 deletions Scripts/Examples/Rumelhart Semantic Network.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@
# It does not yet implement learning or testing.


def step(variable,params,context):
def step(variable):
if np.sum(variable)<.5:
out=0
else:
out=1
return(out)
Step=pnl.UserDefinedFunction(custom_function=step,
default_variable=np.zeros(4))

#Processing Units:
rep_in = pnl.TransferMechanism(size=10, name='REP_IN')
Expand All @@ -42,10 +40,10 @@ def step(variable,params,context):
prop_out = pnl.TransferMechanism(size=12, function=pnl.Logistic, name='PROP_OUT')
qual_out = pnl.TransferMechanism(size=13, function=pnl.Logistic, name='QUAL_OUT')
act_out = pnl.TransferMechanism(size=14, function=pnl.Logistic, name='ACT_OUT')
r_step = pnl.ProcessingMechanism(size=10, function=Step, name='REP_STEP')
p_step = pnl.ProcessingMechanism(size=12, function=Step, name='PROP_STEP')
q_step = pnl.ProcessingMechanism(size=13, function=Step, name='QUAL_STEP')
a_step = pnl.ProcessingMechanism(size=14, function=Step, name='ACT_STEP')
r_step = pnl.ProcessingMechanism(size=10, function=step, name='REP_STEP')
p_step = pnl.ProcessingMechanism(size=12, function=step, name='PROP_STEP')
q_step = pnl.ProcessingMechanism(size=13, function=step, name='QUAL_STEP')
a_step = pnl.ProcessingMechanism(size=14, function=step, name='ACT_STEP')

#Processes that comprise the System:
# NOTE: this is one of several configuration of processes that can be used to construct the full network
Expand Down