#
{header}
{folders}
  +vector  $NEOHOME/lib/vector.so
  +pixel  $NEOHOME/lib/pixel.so
{end}
{status NEO_V7.9 NST_V7.9 area=710x540 adapt steps=1 }
#
# SUBUNITS:
#
input_window
prog_unit
container
draw_sym
write_pix
histo_gram
plot_vec
ctrl_op
#
VARNAME_DEFS:  "dx,dy,zoom"
#
#  USE DIALOG:
#
" width dx  = %1:1000:7i %n"
" height dy = %1:1000:7i %n"
" zoom fact = %1:100:10i %n %[%0:1:0:10d %l`Cancel%d%l`Ok%]%H "
#
#  USE VARIABLES:
#
@0    =  11
@1    =  11
@2    =  12
@3    =  0
@4    =  1
------

BEGIN input_window { %10,310 #
INTERFACE:   {s1:s1}{s2:s8:s1:t20s2}
LABEL:       input|window
UNIQUE_ID:   1
APPLWINDOW:  "MAIN"
------
#
# CREATE WITH:
#
@ZOOM = 0
@0    =  "MAIN"
@1    =  30
@2    =  20
@3    =  0
@4    =  0
@5    =  "%@dx:@dy:0:@zoom=MAZE  "
         "%@dx:@dy:0:@zoom=M_EAST%@dx:@dy:0:@zoom=M_WEST"
         "%@dx:@dy:0:@zoom=M_NORTH%@dx:@dy:0:@zoom=M_SOUTH  "
         "%@dx:@dy:0:@zoom:=BEST %p"
         " maze                 "
         " Q(s,WEST) rot       Q(s,SOUTH) gelb    "
         " Q(s,EAST) green     Q(s,NORTH) blau     "
         " policy%n%n"
         "%400:100=histogram"
         "%2<"
         " memory     : %0:100:5i%2^%!Main:setmem %n%n"
         "%0< exploration (low value) vs. exploitation (high value) %n"
         " test:     %1:50:1:40s %v %n"
         " training: %0.1:10:1:40s %v %1<%p"
         " histogramm of trial lengths %n%n"
         " %d%lstep%!Main:step1 %d%l100%!Main:step100"
         " %d%l1000%!Main:step1000 "
         " %d%lT-100%!Main:adapt100"
         " %d%lT-1000%!Main:adapt1000 "
         " %d%lT-10000%!Main:adapt10000 "
         "%d%lnew %!Main:init "
         " %d%lRescale%!rescl "
         "%R"
@6    =  0
@7    =  0
@8    =  1
------

#
# CONFIGURE WITH:
#
@0    =  1
@1    =  0
@2    =  0
@3    =  0
@4    =  0
@5    =  1
------
ENDOF input_window }

BEGIN prog_unit { %110,330 #
INTERFACE:   {f2:s1}{f121:f484:s2:f121:}
LABEL:       prog
NAME:        "Main"
UNIQUE_ID:   1
OPERANDS:    3
------
#
# CREATE WITH:
#
@PLEV =  2
@ZOOM = 00
@0    =  "// TEMPFILE=*.c (hint for Ctrl-J cmd)"
         "#import miniworld"
         "#import qlearn"
         "const DX=$dx, DY=$dy;"
         "OUT float afReward[DX*DY];"
         "OUT float afQ[4*DX*DY];"
         "OUT scalar afPos[2];"
         "OUT float afBestAction[DX*DY];"
         "int aiColor[]={-4,-7,-9,-14};"
         "INP float afBeta[2];"
         "INP int iMem;"
         "int MID = (DX*DY)/2;"
         "class maze M(DX,DY);"
         "class qlearn Q;"
         "OUT float *pfResults;"
         "int iAction;"
         "static int iResults=0;"
         "static float fReward;"
         ""
         "public setmem() {"
         "  Q.depth(iMem);"
         "  Q.Q := 0;"
         "}"
         ""
         "void Step(int iSteps, int iMode) {"
         ""
         "   if (!Q) {"
         "      Q = qlearn(DX*DY,4);"
         "      Q.depth(5);"
         "      Q.eps = 1;"
         "      Q.gamma = 0.9;"
         "      M.reward[MID] = 1;"
         "      M.penalty=0;"
         "   }"
         ""
         "   fBeta = afBeta[iMode];  // 1 = adapt"
         "   if (!iMode) {"
         "      iResults=0;  avg = 0;"
         "      pfResults = NULL;"
         "      if (iSteps != 1) fReward = 1;  // to start new cycle "
         "   }"
         "   while (iSteps-- > 0) {"
         "      if (fReward == 1) {"
         "         pfResults = resize(++iResults);"
         "         pfResults[iResults-1] = iTrials;"
         "         avg = ((iResults-1)*avg + iTrials)/iResults;"
         "         printf(\"\\a\\a\\a\\a\\a\\n\");"
         "         iTrials = 0;"
         "         M.pos[0] = rnd(DX);"
         "         M.pos[1] = rnd(DY);"
         "         iAdapt=0;"
         "         Q.start_trial();"
         "         Q.set_state(M.state);"
         "      }"
         "      iAction = Q.action(fBeta);"
         "      fReward = M.move(iAction);  iTrials++;"
         "      Q.set_state(M.state); "
         "      if (iAdapt) Q.adapt(fReward,iAction);"
         "      iAdapt=iMode;"
         "      afReward := M.reward;"
         "      afQ  := Q.Q;"
         "      afPos := 0.5+M.pos;"
         "      exec_opnds();"
         "   }"
         "   Q.find_bestaction(aiColor);"
         "   afBestAction := Q.bestaction;"
         "   exec_opnds();"
         "   exec_opnd(\"histo_gram\");"
         "   exec_opnd(\"plot_vec\");"
         "}"
         ""
         "public init() {  Q.start_trial(); }"
         "public step1() {  Step(1,0);  }"
         "public step100() { Step(100,0); }"
         "public step1000() { Step(1000,0); }"
         "public adapt1() {  Step(1,1);  }"
         "public adapt100() { Step(100,1); }"
         "public adapt1000() { Step(1000,1); }"
         "public adapt10000() { Step(10000,1); }"
         ""
         ""
         ""
         ""
@1    =  2
@2    =  1
@3    =  0
@4    =  2
@5    =  1
@6    =  0
@7    =  2
@8    =  1
@9    =  0
@10   =  2
@11   =  1
@12   =  0
@13   =  0
@14   =  0
@15   =  1
------

#
# CONFIGURE WITH:
#
@0    =  "prog"
@1    =  0
@2    =  0
@3    =  0
@4    =  1
------
#
# Defs for Class Icon:
#

{ VOID_#1067 }
{ setmem }
{ init }
{ step1 }
{ step100 }
{ step1000 }
{ adapt1 }
{ adapt100 }
{ adapt1000 }
{ adapt10000 }
ENDOF prog_unit }

BEGIN container { %350,330 #
INTERFACE:   {f121:f484}{}
LABEL:       gra|phics
UNIQUE_ID:   1
#
# SUBUNITS:
#
scale_vec
scale_vec
write_pix
splitter
write_pix
write_pix
write_pix
write_pix
#
------

#
# CONFIGURE WITH:
#
@0    =  "gra|phics"
@1    =  0
@2    =  1
------

BEGIN scale_vec { %80,100 #
INTERFACE:   {f484:s1}{f484}
LABEL:       scale_vec
UNIQUE_ID:   1
------
#
# CREATE WITH:
#
@PLEV =  1
@0    = -4*$dx*$dy
@1    =  0
@2    =  0.
@3    =  0
@4    =  0.
@5    =  255.
@6    =  0
@7    =  1
------
ENDOF scale_vec }

BEGIN scale_vec { %90,370 #
INTERFACE:   {f121:s1}{f121}
LABEL:       scale_vec
UNIQUE_ID:   2
------
#
# CREATE WITH:
#
@PLEV =  1
@0    = -$dx*$dy
@1    =  0
@2    =  0
@3    =  0
@4    =  0
@5    =  255
@6    =  0
@7    =  1
------
ENDOF scale_vec }

BEGIN write_pix { %200,430 #
INTERFACE:   {f121:s1}{}
LABEL:       write|pix
UNIQUE_ID:   1
------
#
# CREATE WITH:
#
@PLEV =  3
@0    =  "MAZE"
@1    =  $dx
@2    =  $dy
@3    =  $zoom
@4    =  0
@5    =  1
@6    =  0
@7    =  0
@8    =  0
@9    =  ""
@10   =  0
@11   =  1
------

#
# CONFIGURE WITH:
#
@0    =  0
@1    =  0
@2    =  0
@3    =  1
------
ENDOF write_pix }

BEGIN splitter { %205,100 #
INTERFACE:   {f484}{f121:f121:f121:f121}
LABEL:       split|ter
UNIQUE_ID:   1
------
#
# CREATE WITH:
#
@0    = -$dx*$dy
@1    = -$dx*$dy
@2    = -$dx*$dy
@3    = -$dx*$dy
@17   =  1
@18   =  0
@19   =  1
------
ENDOF splitter }

BEGIN write_pix { %325,335 #
INTERFACE:   {f121:s1}{}
LABEL:       write|pix
UNIQUE_ID:   2
------
#
# CREATE WITH:
#
@PLEV =  3
@0    =  "M_EAST"
@1    =  $dx
@2    =  $dy
@3    =  $zoom
@4    =  0
@5    =  1
@6    =  0
@7    =  0
@8    =  0
@9    =  ""
@10   =  0
@11   =  1
------

#
# CONFIGURE WITH:
#
@0    =  0
@1    =  0
@2    =  0
@3    =  1
------
ENDOF write_pix }

BEGIN write_pix { %465,230 #
INTERFACE:   {f121:s1}{}
LABEL:       write|pix
UNIQUE_ID:   3
------
#
# CREATE WITH:
#
@PLEV =  3
@0    =  "M_WEST"
@1    =  $dx
@2    =  $dy
@3    =  $zoom
@4    =  0
@5    =  1
@6    =  0
@7    =  0
@8    =  0
@9    =  ""
@10   =  0
@11   =  1
------

#
# CONFIGURE WITH:
#
@0    =  0
@1    =  0
@2    =  0
@3    =  1
------
ENDOF write_pix }

BEGIN write_pix { %590,145 #
INTERFACE:   {f121:s1}{}
LABEL:       write|pix
UNIQUE_ID:   4
------
#
# CREATE WITH:
#
@PLEV =  3
@0    =  "M_NORTH"
@1    =  $dx
@2    =  $dy
@3    =  $zoom
@4    =  0
@5    =  1
@6    =  0
@7    =  0
@8    =  0
@9    =  ""
@10   =  0
@11   =  1
------

#
# CONFIGURE WITH:
#
@0    =  0
@1    =  0
@2    =  0
@3    =  1
------
ENDOF write_pix }

BEGIN write_pix { %630,40 #
INTERFACE:   {f121:s1}{}
LABEL:       write|pix
UNIQUE_ID:   5
------
#
# CREATE WITH:
#
@PLEV =  3
@0    =  "M_SOUTH"
@1    =  $dx
@2    =  $dy
@3    =  $zoom
@4    =  0
@5    =  1
@6    =  0
@7    =  0
@8    =  0
@9    =  ""
@10   =  0
@11   =  1
------

#
# CONFIGURE WITH:
#
@0    =  0
@1    =  0
@2    =  0
@3    =  1
------
ENDOF write_pix }

WIRE          0 0 -> 3 0 %185.5,140+0
CONNECTIONS:  1 0->0

WIRE          -1 1 -> 0 0 %46,147.5+0
CONNECTIONS:  1 0->0

WIRE          3 3 -> 7 0 %488,105+0
CONNECTIONS:  1 0->0

WIRE          3 2 -> 6 0 %438,167.5+0
CONNECTIONS:  1 0->0

WIRE          3 1 -> 5 0 %375.5,220+0
CONNECTIONS:  1 0->0

WIRE          3 0 -> 4 0 %305.5,282.5+0
CONNECTIONS:  1 0->0

WIRE          -1 0 -> 1 0 %55.8854,417.5+0
CONNECTIONS:  1 0->0

WIRE          1 0 -> 2 0 %185.5,450+0
CONNECTIONS:  1 0->0
ENDOF container }

BEGIN draw_sym { %385,235 #
INTERFACE:   {s2:s3:s1}{}
LABEL:       draw_sym
UNIQUE_ID:   1
------
#
# CREATE WITH:
#
@PLEV =  2
@0    =  "MAZE"
@1    =  0
@2    =  5
@3    =  8
@4    =  10
@5    =  0
@6    =  2
@7    =  1
@8    =  ""
@9    =  0
@10   =  1
------
ENDOF draw_sym }

BEGIN write_pix { %425,435 #
INTERFACE:   {f121:s1}{}
LABEL:       write|pix
UNIQUE_ID:   6
------
#
# CREATE WITH:
#
@PLEV =  3
@0    =  "BEST"
@1    =  $dx
@2    =  $dy
@3    =  $zoom
@4    =  2
@5    =  1
@6    =  0
@7    =  0
@8    =  0
@9    =  ""
@10   =  0
@11   =  1
------

#
# CONFIGURE WITH:
#
@0    =  0
@1    =  0
@2    =  0
@3    =  1
------
ENDOF write_pix }

BEGIN histo_gram { %515,115 #
INTERFACE:   {:s2:s1}{s10:s3:s3}
LABEL:       histo_gram
NAME:        "histo_gram"
UNIQUE_ID:   1
------
#
# CREATE WITH:
#
@0    =  0
@1    =  10
@2    =  0.
@3    =  $dx*$dy/2
@4    =  0
@5    =  1
------
ENDOF histo_gram }

BEGIN plot_vec { %610,120 #
INTERFACE:   {s10:s1}{}
LABEL:       plot_vec
NAME:        "plot_vec"
UNIQUE_ID:   1
------
#
# CREATE WITH:
#
@ZOOM = 1
@0    =  "histogram"
@1    =  350
@2    =  200
@3    =  0
@4    =  0
@5    =  0.
@6    =  10.
@7    =  10
@8    =  2
@9    =  10
@10   =  20
@38   =  0
@39   =  "%10:10:20:10M"
@40   =  0
@41   =  1
------

#
# CONFIGURE WITH:
#
@PLEV =  1
@0    =  0
@1    =  0
@2    =  0
@3    =  0
@4    =  1
@5    =  0
@6    =  0
@7    =  0
@8    =  0
@9    =  1
------
ENDOF plot_vec }

BEGIN ctrl_op { %620,20 #
INTERFACE:   {s1}{}
LABEL:       ctrl|op
NAME:        "rescl"
UNIQUE_ID:   1
OPERANDS:    -1 -1
------
#
# CREATE WITH:
#
@PLEV =  1
@0    = -1
@1    =  1
@2    =  "EXEC"
@3    =  "W_YRESCL"
@4    =  0
@5    =  1
------
ENDOF ctrl_op }

WIRE          5 0 -> 6 0 %603,180.833-2.5
CONNECTIONS:  10 0->0 1->1 2->2 3->3 4->4 5->5 6->6 7->7 8->8 9->9

WIRE          1 0 -> 2 0 %268,396+0
CONNECTIONS:  1 0->0

WIRE          1 1 -> 2 1 %268,368+0
CONNECTIONS:  1 0->0

WIRE          0 0 -> 1 0 %100.5,385+0
CONNECTIONS:  1 0->0

WIRE          1 2 -> 3 0 %205.5,335.833+0
CONNECTIONS:  2 0->0 1->1

WIRE          1 3 -> 4 0 %204.75,354+4.25
CONNECTIONS:  1 0->0

WIRE          1 4 -> 5 0 %201,259.833+0
CONNECTIONS:  1 0->0

WIRE          0 2 -> 1 1 %100.5,345+0
CONNECTIONS:  1 0->0

##_____END_OF_CIRCUIT_____
#
##_____BGN_OF_NSTDATA_____ !BeginOfUnit: input_window#1164 { 2 ifields of dim: 1 1 3 ofields of dim: 2 8 1 values: out_0: 1.00000000e+00 1.00000000e+00 out_1: 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 out_2: 5.00000000e+00 text fields: out_3: 2 2 2 5 Status: Open 1 n3 94 403 #EndOfUnit:input_window#1164}DoNotEdit!# !BeginOfUnit: Main#[39] { Format=NST5 Flags: 0 2 ifields of dim: f2 s1 values: inp_1: 5.00000000e+00 5 ofields of dim: f121 f484 s2 f121 @VARIABLES global program float afBestAction[121] 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 scalar afPos[2] 0.00000000e+00 0.00000000e+00 float afQ[484] 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 float afReward[121] 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 float fReward[1] 0.00000000e+00 end data !BeginOfUnit: return_unit#1070 { Format=NST5 Flags: 0 1 ifields of dim: s1 values: inp_0: 1.00000000e+00 0 ofields #EndOfUnit:return_unit#1070}DoNotEdit!# !BeginOfUnit: setmem#[40] { Format=NST5 Flags: 0 0 ifields 0 ofields #EndOfUnit:setmem#[40]}DoNotEdit!# !BeginOfUnit: init#[41] { Format=NST5 Flags: 0 0 ifields 0 ofields #EndOfUnit:init#[41]}DoNotEdit!# !BeginOfUnit: step1#[42] { Format=NST5 Flags: 0 0 ifields 0 ofields #EndOfUnit:step1#[42]}DoNotEdit!# !BeginOfUnit: step100#[43] { Format=NST5 Flags: 0 0 ifields 0 ofields #EndOfUnit:step100#[43]}DoNotEdit!# !BeginOfUnit: step1000#[44] { Format=NST5 Flags: 0 0 ifields 0 ofields #EndOfUnit:step1000#[44]}DoNotEdit!# !BeginOfUnit: adapt1#[45] { Format=NST5 Flags: 0 0 ifields 0 ofields #EndOfUnit:adapt1#[45]}DoNotEdit!# !BeginOfUnit: adapt100#[46] { Format=NST5 Flags: 0 0 ifields 0 ofields #EndOfUnit:adapt100#[46]}DoNotEdit!# !BeginOfUnit: adapt1000#[47] { Format=NST5 Flags: 0 0 ifields 0 ofields #EndOfUnit:adapt1000#[47]}DoNotEdit!# !BeginOfUnit: adapt10000#[48] { Format=NST5 Flags: 0 0 ifields 0 ofields #EndOfUnit:adapt10000#[48]}DoNotEdit!# #EndOfUnit:Main#[39]}DoNotEdit!# !BeginOfUnit: CONTAINER#1092 { Format=NST5 Flags: 0 2 ifields of dim: f121 f484 (only_vector_inputs) 0 ofields !BeginOfUnit: scale_vec#1095 { Format=NST5 Flags: 0 2 ifields of dim: f484 s1 values: inp_1: 1.00000000e+00 1 ofields of dim: f484 #EndOfUnit:scale_vec#1095}DoNotEdit!# !BeginOfUnit: scale_vec#1098 { Format=NST5 Flags: 0 2 ifields of dim: f121 s1 values: inp_1: 1.00000000e+00 1 ofields of dim: f121 #EndOfUnit:scale_vec#1098}DoNotEdit!# !BeginOfUnit: write_pix#1102 { Format=NST5 Flags: 0 2 ifields of dim: f121 s1 values: inp_1: 1.00000000e+00 0 ofields NoPosInfo 205 #EndOfUnit:write_pix#1102}DoNotEdit!# !BeginOfUnit: splitter1#1105 { Format=NST5 Flags: 0 1 ifields of dim: f484 (only_vector_inputs) 4 ofields of dim: f121 f121 f121 f121 #EndOfUnit:splitter1#1105}DoNotEdit!# !BeginOfUnit: write_pix#1109 { Format=NST5 Flags: 0 2 ifields of dim: f121 s1 values: inp_1: 1.00000000e+00 0 ofields NoPosInfo 204 #EndOfUnit:write_pix#1109}DoNotEdit!# !BeginOfUnit: write_pix#1113 { Format=NST5 Flags: 0 2 ifields of dim: f121 s1 values: inp_1: 1.00000000e+00 0 ofields NoPosInfo 203 #EndOfUnit:write_pix#1113}DoNotEdit!# !BeginOfUnit: write_pix#1117 { Format=NST5 Flags: 0 2 ifields of dim: f121 s1 values: inp_1: 1.00000000e+00 0 ofields NoPosInfo 202 #EndOfUnit:write_pix#1117}DoNotEdit!# !BeginOfUnit: write_pix#1121 { Format=NST5 Flags: 0 2 ifields of dim: f121 s1 values: inp_1: 1.00000000e+00 0 ofields NoPosInfo 201 #EndOfUnit:write_pix#1121}DoNotEdit!# #EndOfUnit:CONTAINER#1092}DoNotEdit!# !BeginOfUnit: draw_sym#1132 { Format=NST5 Flags: 0 3 ifields of dim: s2 s3 s1 values: inp_0: 0.00000000e+00 0.00000000e+00 inp_1: 5.00000000e+00 8.00000000e+00 1.00000000e+01 inp_2: 2.00000000e+00 0 ofields #EndOfUnit:draw_sym#1132}DoNotEdit!# !BeginOfUnit: write_pix#1136 { Format=NST5 Flags: 0 2 ifields of dim: f121 s1 values: inp_1: 1.00000000e+00 0 ofields NoPosInfo 200 #EndOfUnit:write_pix#1136}DoNotEdit!# !BeginOfUnit: histo_gram#[49] { Format=NST5 Flags: 0 3 ifields of dim: s2 s1 values: inp_1: 0.00000000e+00 6.05000000e+01 inp_2: 1.00000000e+00 3 ofields of dim: s10 s3 s3 #EndOfUnit:histo_gram#[49]}DoNotEdit!# !BeginOfUnit: plot_vec#[50] { Format=NST5 Flags: 0 2 ifields of dim: s10 s1 values: inp_0: 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00 inp_1: 1.00000000e+00 0 ofields !BeginOfUnit: plot_xy#1143 { Format=NST5 Flags: 0 2 ifields of dim: s2 s1 values: inp_0: 0.00000000e+00 0.00000000e+00 inp_1: 0.00000000e+00 0 ofields NoPosInfo numpts:[1]: 0 #EndOfUnit:plot_xy#1143}DoNotEdit!# #EndOfUnit:plot_vec#[50]}DoNotEdit!# !BeginOfUnit: rescl#[51] { Format=NST5 Flags: 0 1 ifields of dim: s1 values: inp_0: 1.00000000e+00 0 ofields #EndOfUnit:rescl#[51]}DoNotEdit!# ##_____END_OF_NSTFILE_____