Skip to content

Commit 3fd7497

Browse files
authored
Fix bug where failures in wait time validation trigger immediate reward (#582)
1 parent 560223b commit 3fd7497

1 file changed

Lines changed: 57 additions & 10 deletions

File tree

src/Extensions/InstantiateSite.bonsai

Lines changed: 57 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,49 @@ it.Item2 as EntryPosition)</scr:Expression>
525525
</Edges>
526526
</Workflow>
527527
</Expression>
528+
<Expression xsi:type="rx:Condition">
529+
<Name>!IsValidWait?</Name>
530+
<Workflow>
531+
<Nodes>
532+
<Expression xsi:type="WorkflowInput">
533+
<Name>Source1</Name>
534+
</Expression>
535+
<Expression xsi:type="MemberSelector">
536+
<Selector>IsSuccessfulWait</Selector>
537+
</Expression>
538+
<Expression xsi:type="BitwiseNot" />
539+
<Expression xsi:type="WorkflowOutput" />
540+
</Nodes>
541+
<Edges>
542+
<Edge From="0" To="1" Label="Source1" />
543+
<Edge From="1" To="2" Label="Source1" />
544+
<Edge From="2" To="3" Label="Source1" />
545+
</Edges>
546+
</Workflow>
547+
</Expression>
548+
<Expression xsi:type="Combinator">
549+
<Combinator xsi:type="BooleanProperty">
550+
<Value>false</Value>
551+
</Combinator>
552+
</Expression>
553+
<Expression xsi:type="rx:Condition">
554+
<Name>IsValidWait?</Name>
555+
<Workflow>
556+
<Nodes>
557+
<Expression xsi:type="WorkflowInput">
558+
<Name>Source1</Name>
559+
</Expression>
560+
<Expression xsi:type="MemberSelector">
561+
<Selector>IsSuccessfulWait</Selector>
562+
</Expression>
563+
<Expression xsi:type="WorkflowOutput" />
564+
</Nodes>
565+
<Edges>
566+
<Edge From="0" To="1" Label="Source1" />
567+
<Edge From="1" To="2" Label="Source1" />
568+
</Edges>
569+
</Workflow>
570+
</Expression>
528571
<Expression xsi:type="rx:Condition">
529572
<Name>Operant</Name>
530573
<Workflow>
@@ -1069,24 +1112,28 @@ it.Item2 as EntryPosition)</scr:Expression>
10691112
<Edge From="11" To="12" Label="Source1" />
10701113
<Edge From="12" To="13" Label="Source1" />
10711114
<Edge From="13" To="14" Label="Source1" />
1072-
<Edge From="13" To="21" Label="Source1" />
1115+
<Edge From="13" To="16" Label="Source1" />
10731116
<Edge From="14" To="15" Label="Source1" />
1074-
<Edge From="15" To="16" Label="Source1" />
1075-
<Edge From="15" To="19" Label="Source1" />
1117+
<Edge From="15" To="31" Label="Source1" />
10761118
<Edge From="16" To="17" Label="Source1" />
1119+
<Edge From="16" To="24" Label="Source1" />
10771120
<Edge From="17" To="18" Label="Source1" />
1078-
<Edge From="18" To="28" Label="Source1" />
1121+
<Edge From="18" To="19" Label="Source1" />
1122+
<Edge From="18" To="22" Label="Source1" />
10791123
<Edge From="19" To="20" Label="Source1" />
1080-
<Edge From="20" To="23" Label="Source1" />
1081-
<Edge From="21" To="22" Label="Source1" />
1082-
<Edge From="22" To="23" Label="Source2" />
1083-
<Edge From="23" To="24" Label="Source1" />
1124+
<Edge From="20" To="21" Label="Source1" />
1125+
<Edge From="21" To="31" Label="Source2" />
1126+
<Edge From="22" To="23" Label="Source1" />
1127+
<Edge From="23" To="26" Label="Source1" />
10841128
<Edge From="24" To="25" Label="Source1" />
1085-
<Edge From="25" To="26" Label="Source1" />
1129+
<Edge From="25" To="26" Label="Source2" />
10861130
<Edge From="26" To="27" Label="Source1" />
1087-
<Edge From="27" To="28" Label="Source2" />
1131+
<Edge From="27" To="28" Label="Source1" />
10881132
<Edge From="28" To="29" Label="Source1" />
10891133
<Edge From="29" To="30" Label="Source1" />
1134+
<Edge From="30" To="31" Label="Source3" />
1135+
<Edge From="31" To="32" Label="Source1" />
1136+
<Edge From="32" To="33" Label="Source1" />
10901137
</Edges>
10911138
</Workflow>
10921139
</Expression>

0 commit comments

Comments
 (0)