Esempio n. 1
0
    def ConfigGui(ss):
        """
        ConfigGui configures the GoGi gui interface for this simulation,
        """
        width = 1600
        height = 1200

        gi.SetAppName("v1rf")
        gi.SetAppAbout(
            'This simulation illustrates how self-organizing learning in response to natural images produces the oriented edge detector receptive field properties of neurons in primary visual cortex (V1). This provides insight into why the visual system encodes information in the way it does, while also providing an important test of the biological relevance of our computational models. See <a href="https://github.com/CompCogNeuro/sims/blob/master/ch6/v1rf/README.md">README.md on GitHub</a>.</p>'
        )

        win = gi.NewMainWindow("v1rf", "V1 Receptive Fields", width, height)
        ss.Win = win

        vp = win.WinViewport2D()
        ss.vp = vp
        updt = vp.UpdateStart()

        mfr = win.SetMainFrame()

        tbar = gi.AddNewToolBar(mfr, "tbar")
        tbar.SetStretchMaxWidth()
        ss.ToolBar = tbar

        split = gi.AddNewSplitView(mfr, "split")
        split.Dim = mat32.X
        split.SetStretchMax()

        cv = ss.NewClassView("sv")
        cv.AddFrame(split)
        cv.Config()

        tv = gi.AddNewTabView(split, "tv")

        nv = netview.NetView()
        tv.AddTab(nv, "NetView")
        nv.Var = "Act"
        nv.SetNet(ss.Net)
        ss.NetView = nv
        ss.ConfigNetView(nv)

        plt = eplot.Plot2D()
        tv.AddTab(plt, "TrnEpcPlot")
        ss.TrnEpcPlot = ss.ConfigTrnEpcPlot(plt, ss.TrnEpcLog)

        tg = etview.TensorGrid()
        tv.AddTab(tg, "Image")
        tg.SetStretchMax()
        ss.CurImgGrid = tg
        tg.SetTensor(ss.TrainEnv.Vis.ImgTsr)

        tg = etview.TensorGrid()
        tv.AddTab(tg, "V1 RFs")
        tg.SetStretchMax()
        ss.WtsGrid = tg
        tg.SetTensor(ss.V1Wts)

        plt = eplot.Plot2D()
        tv.AddTab(plt, "TstTrlPlot")
        ss.TstTrlPlot = ss.ConfigTstTrlPlot(plt, ss.TstTrlLog)

        plt = eplot.Plot2D()
        tv.AddTab(plt, "TstEpcPlot")
        ss.TstEpcPlot = ss.ConfigTstEpcPlot(plt, ss.TstEpcLog)

        plt = eplot.Plot2D()
        tv.AddTab(plt, "RunPlot")
        ss.RunPlot = ss.ConfigRunPlot(plt, ss.RunLog)

        split.SetSplitsList(go.Slice_float32([.2, .8]))

        recv = win.This()

        tbar.AddAction(
            gi.ActOpts(
                Label="Init",
                Icon="update",
                Tooltip=
                "Initialize everything including network weights, and start over.  Also applies current params.",
                UpdateFunc=UpdtFuncNotRunning), recv, InitCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="Train",
                Icon="run",
                Tooltip=
                "Starts the network training, picking up from wherever it may have left off.  If not stopped, training will complete the specified number of Runs through the full number of Epochs of training, with testing automatically occuring at the specified interval.",
                UpdateFunc=UpdtFuncNotRunning), recv, TrainCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="Stop",
                Icon="stop",
                Tooltip=
                "Interrupts running.  Hitting Train again will pick back up where it left off.",
                UpdateFunc=UpdtFuncRunning), recv, StopCB)

        tbar.AddAction(
            gi.ActOpts(Label="Step Trial",
                       Icon="step-fwd",
                       Tooltip="Advances one training trial at a time.",
                       UpdateFunc=UpdtFuncNotRunning), recv, StepTrialCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="Step Epoch",
                Icon="fast-fwd",
                Tooltip=
                "Advances one epoch (complete set of training patterns) at a time.",
                UpdateFunc=UpdtFuncNotRunning), recv, StepEpochCB)

        tbar.AddAction(
            gi.ActOpts(Label="Step Run",
                       Icon="fast-fwd",
                       Tooltip="Advances one full training Run at a time.",
                       UpdateFunc=UpdtFuncNotRunning), recv, StepRunCB)

        tbar.AddSeparator("spec")

        tbar.AddAction(
            gi.ActOpts(
                Label="Open Rec=.2 Wts",
                Icon="updt",
                Tooltip=
                "Open weights trained with excitatory lateral (recurrent) con scale = .2.",
                UpdateFunc=UpdtFuncNotRunning), recv, OpenRec2WtsCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="Open Rec=.05 Wts",
                Icon="updt",
                Tooltip=
                "Open weights trained with excitatory lateral (recurrent) con scale = .05.",
                UpdateFunc=UpdtFuncNotRunning), recv, OpenRec05WtsCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="V1 RFs",
                Icon="file-image",
                Tooltip=
                "Update the V1 Receptive Field (Weights) plot in V1 RFs tab.",
                UpdateFunc=UpdtFuncNotRunning), recv, V1RFsCB)

        tbar.AddSeparator("test")

        tbar.AddAction(
            gi.ActOpts(Label="Test Trial",
                       Icon="step-fwd",
                       Tooltip="Runs the next testing trial.",
                       UpdateFunc=UpdtFuncNotRunning), recv, TestTrialCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="Test Item",
                Icon="step-fwd",
                Tooltip=
                "Prompts for a specific input pattern name to run, and runs it in testing mode.",
                UpdateFunc=UpdtFuncNotRunning), recv, TestItemCB)

        tbar.AddAction(
            gi.ActOpts(Label="Test All",
                       Icon="fast-fwd",
                       Tooltip="Tests all of the testing trials.",
                       UpdateFunc=UpdtFuncNotRunning), recv, TestAllCB)

        tbar.AddSeparator("log")

        tbar.AddAction(
            gi.ActOpts(
                Label="Reset RunLog",
                Icon="reset",
                Tooltip=
                "Resets the accumulated log of all Runs, which are tagged with the ParamSet used"
            ), recv, ResetRunLogCB)

        tbar.AddSeparator("misc")

        tbar.AddAction(
            gi.ActOpts(
                Label="New Seed",
                Icon="new",
                Tooltip=
                "Generate a new initial random seed to get different results.  By default, Init re-establishes the same initial seed every time."
            ), recv, NewRndSeedCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="README",
                Icon="file-markdown",
                Tooltip=
                "Opens your browser on the README file that contains instructions for how to run this model."
            ), recv, ReadmeCB)

        # main menu
        appnm = gi.AppName()
        mmen = win.MainMenu
        mmen.ConfigMenus(go.Slice_string([appnm, "File", "Edit", "Window"]))

        amen = gi.Action(win.MainMenu.ChildByName(appnm, 0))
        amen.Menu.AddAppMenu(win)

        emen = gi.Action(win.MainMenu.ChildByName("Edit", 1))
        emen.Menu.AddCopyCutPaste(win)

        win.MainMenuUpdated()
        vp.UpdateEndNoSig(updt)
        win.GoStartEventLoop()
Esempio n. 2
0
    def ConfigGui(ss):
        """
        ConfigGui configures the GoGi gui interface for this simulation,
        """
        width = 1600
        height = 1200

        gi.SetAppName("rl_cond")
        gi.SetAppAbout(
            'rl_cond explores the temporal differences (TD) reinforcement learning algorithm under some basic Pavlovian conditioning environments. See <a href="https://github.com/CompCogNeuro/sims/blob/master/ch7/rl_cond/README.md">README.md on GitHub</a>.</p>'
        )

        win = gi.NewMainWindow("rl_cond", "Reinforcement Learning", width,
                               height)
        ss.Win = win

        vp = win.WinViewport2D()
        ss.vp = vp
        updt = vp.UpdateStart()

        mfr = win.SetMainFrame()

        tbar = gi.AddNewToolBar(mfr, "tbar")
        tbar.SetStretchMaxWidth()
        ss.ToolBar = tbar

        split = gi.AddNewSplitView(mfr, "split")
        split.Dim = mat32.X
        split.SetStretchMax()

        cv = ss.NewClassView("sv")
        cv.AddFrame(split)
        cv.Config()

        tv = gi.AddNewTabView(split, "tv")

        nv = netview.NetView()
        tv.AddTab(nv, "NetView")
        nv.Var = "Act"
        nv.SetNet(ss.Net)
        ss.NetView = nv

        plt = eplot.Plot2D()
        tv.AddTab(plt, "TrnTrlPlot")
        ss.TrnTrlPlot = ss.ConfigTrnTrlPlot(plt, ss.TrnTrlLog)

        tg = etview.TensorGrid()
        tv.AddTab(tg, "Weights")
        tg.SetStretchMax()
        ss.WtsGrid = tg
        tg.SetTensor(ss.RewPredInputWts)

        plt = eplot.Plot2D()
        tv.AddTab(plt, "TrnEpcPlot")
        ss.TrnEpcPlot = ss.ConfigTrnEpcPlot(plt, ss.TrnEpcLog)

        split.SetSplitsList(go.Slice_float32([.2, .8]))

        recv = win.This()

        tbar.AddAction(
            gi.ActOpts(
                Label="Init",
                Icon="update",
                Tooltip=
                "Initialize everything including network weights, and start over.  Also applies current params.",
                UpdateFunc=UpdtFuncNotRunning), recv, InitCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="Train",
                Icon="run",
                Tooltip=
                "Starts the network training, picking up from wherever it may have left off.  If not stopped, training will complete the specified number of Runs through the full number of Epochs of training, with testing automatically occuring at the specified interval.",
                UpdateFunc=UpdtFuncNotRunning), recv, TrainCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="Stop",
                Icon="stop",
                Tooltip=
                "Interrupts running.  Hitting Train again will pick back up where it left off.",
                UpdateFunc=UpdtFuncRunning), recv, StopCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="Step Event",
                Icon="step-fwd",
                Tooltip="Advances one training event (time step) at a time.",
                UpdateFunc=UpdtFuncNotRunning), recv, StepEventCB)

        tbar.AddAction(
            gi.ActOpts(Label="Step Trial",
                       Icon="step-fwd",
                       Tooltip="Advances one training trial at a time.",
                       UpdateFunc=UpdtFuncNotRunning), recv, StepTrialCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="Step Epoch",
                Icon="fast-fwd",
                Tooltip=
                "Advances one epoch (complete set of training patterns) at a time.",
                UpdateFunc=UpdtFuncNotRunning), recv, StepEpochCB)

        tbar.AddAction(
            gi.ActOpts(Label="Step Run",
                       Icon="fast-fwd",
                       Tooltip="Advances one full training Run at a time.",
                       UpdateFunc=UpdtFuncNotRunning), recv, StepRunCB)

        tbar.AddSeparator("views")

        tbar.AddAction(
            gi.ActOpts(Label="Reset Trl Log",
                       Icon="update",
                       Tooltip="Reset trial log.",
                       UpdateFunc=UpdtFuncNotRunning), recv, ResetTrlLogCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="Weights Updt",
                Icon="update",
                Tooltip=
                "Update the Weights grid display to reflect the current weights.",
                UpdateFunc=UpdtFuncNotRunning), recv, WeightsUpdtCB)

        tbar.AddSeparator("misc")

        tbar.AddAction(
            gi.ActOpts(Label="Defaults",
                       Icon="update",
                       Tooltip="Restore initial default parameters.",
                       UpdateFunc=UpdtFuncNotRunning), recv, DefaultsCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="New Seed",
                Icon="new",
                Tooltip=
                "Generate a new initial random seed to get different results.  By default, Init re-establishes the same initial seed every time."
            ), recv, NewRndSeedCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="README",
                Icon="file-markdown",
                Tooltip=
                "Opens your browser on the README file that contains instructions for how to run this model."
            ), recv, ReadmeCB)

        vp.UpdateEndNoSig(updt)

        appnm = gi.AppName()
        mmen = win.MainMenu
        mmen.ConfigMenus(go.Slice_string([appnm, "File", "Edit", "Window"]))

        amen = gi.Action(win.MainMenu.ChildByName(appnm, 0))
        amen.Menu.AddAppMenu(win)

        emen = gi.Action(win.MainMenu.ChildByName("Edit", 1))
        emen.Menu.AddCopyCutPaste(win)

        win.MainMenuUpdated()
        vp.UpdateEndNoSig(updt)
        win.GoStartEventLoop()
Esempio n. 3
0
    def ConfigGui(ss):
        """
        ConfigGui configures the GoGi gui interface for this simulation,
        """
        width = 1600
        height = 1200

        gi.SetAppName("bg")
        gi.SetAppAbout(
            'is a simplified basal ganglia (BG) network showing how dopamine bursts can reinforce *Go* (direct pathway) firing for actions that lead to reward, and dopamine dips reinforce *NoGo* (indirect pathway) firing for actions that do not lead to positive outcomes, producing Thorndikes classic *Law of Effect* for instrumental conditioning, and also providing a mechanism to learn and select among actions with different reward probabilities over multiple experiences. See <a href="https://github.com/CompCogNeuro/sims/blob/master/ch7/bg/README.md">README.md on GitHub</a>.</p>'
        )

        win = gi.NewMainWindow("bg", "Basal Ganglia", width, height)
        ss.Win = win

        vp = win.WinViewport2D()
        ss.vp = vp
        updt = vp.UpdateStart()

        mfr = win.SetMainFrame()

        tbar = gi.AddNewToolBar(mfr, "tbar")
        tbar.SetStretchMaxWidth()
        ss.ToolBar = tbar

        split = gi.AddNewSplitView(mfr, "split")
        split.Dim = mat32.X
        split.SetStretchMax()

        cv = ss.NewClassView("sv")
        cv.AddFrame(split)
        cv.Config()

        tv = gi.AddNewTabView(split, "tv")

        nv = netview.NetView()
        tv.AddTab(nv, "NetView")
        nv.Var = "Act"
        nv.SetNet(ss.Net)
        ss.NetView = nv
        ss.ConfigNetView(nv)

        plt = eplot.Plot2D()
        tv.AddTab(plt, "TrnEpcPlot")
        ss.TrnEpcPlot = ss.ConfigTrnEpcPlot(plt, ss.TrnEpcLog)

        tg = etview.TensorGrid()
        tv.AddTab(tg, "Weights")
        tg.SetStretchMax()
        ss.WtsGrid = tg
        tg.SetTensor(ss.MtxInputWts)

        plt = eplot.Plot2D()
        tv.AddTab(plt, "TstTrlPlot")
        ss.TstTrlPlot = ss.ConfigTstTrlPlot(plt, ss.TstTrlLog)

        plt = eplot.Plot2D()
        tv.AddTab(plt, "TstEpcPlot")
        ss.TstEpcPlot = ss.ConfigTstEpcPlot(plt, ss.TstEpcLog)

        plt = eplot.Plot2D()
        tv.AddTab(plt, "RunPlot")
        ss.RunPlot = ss.ConfigRunPlot(plt, ss.RunLog)

        split.SetSplitsList(go.Slice_float32([.2, .8]))

        recv = win.This()

        tbar.AddAction(
            gi.ActOpts(
                Label="Init",
                Icon="update",
                Tooltip=
                "Initialize everything including network weights, and start over.  Also applies current params.",
                UpdateFunc=UpdtFuncNotRunning), recv, InitCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="Train",
                Icon="run",
                Tooltip=
                "Starts the network training, picking up from wherever it may have left off.  If not stopped, training will complete the specified number of Runs through the full number of Epochs of training, with testing automatically occuring at the specified interval.",
                UpdateFunc=UpdtFuncNotRunning), recv, TrainCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="Stop",
                Icon="stop",
                Tooltip=
                "Interrupts running.  Hitting Train again will pick back up where it left off.",
                UpdateFunc=UpdtFuncRunning), recv, StopCB)

        tbar.AddAction(
            gi.ActOpts(Label="Step Trial",
                       Icon="step-fwd",
                       Tooltip="Advances one training trial at a time.",
                       UpdateFunc=UpdtFuncNotRunning), recv, StepTrialCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="Step Epoch",
                Icon="fast-fwd",
                Tooltip=
                "Advances one epoch (complete set of training patterns) at a time.",
                UpdateFunc=UpdtFuncNotRunning), recv, StepEpochCB)

        tbar.AddAction(
            gi.ActOpts(Label="Step Run",
                       Icon="fast-fwd",
                       Tooltip="Advances one full training Run at a time.",
                       UpdateFunc=UpdtFuncNotRunning), recv, StepRunCB)

        tbar.AddSeparator("test")

        tbar.AddAction(
            gi.ActOpts(Label="Test Trial",
                       Icon="step-fwd",
                       Tooltip="Runs the next testing trial.",
                       UpdateFunc=UpdtFuncNotRunning), recv, TestTrialCB)

        tbar.AddAction(
            gi.ActOpts(Label="Test All",
                       Icon="fast-fwd",
                       Tooltip="Tests all of the testing trials.",
                       UpdateFunc=UpdtFuncNotRunning), recv, TestAllCB)

        tbar.AddSeparator("log")

        tbar.AddAction(
            gi.ActOpts(
                Label="Reset RunLog",
                Icon="reset",
                Tooltip=
                "Resets the accumulated log of all Runs, which are tagged with the ParamSet used"
            ), recv, ResetRunLogCB)

        tbar.AddSeparator("misc")

        tbar.AddAction(
            gi.ActOpts(Label="Defaults",
                       Icon="update",
                       Tooltip="Restore initial default parameters.",
                       UpdateFunc=UpdtFuncNotRunning), recv, DefaultsCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="New Seed",
                Icon="new",
                Tooltip=
                "Generate a new initial random seed to get different results.  By default, Init re-establishes the same initial seed every time."
            ), recv, NewRndSeedCB)

        tbar.AddAction(
            gi.ActOpts(
                Label="README",
                Icon="file-markdown",
                Tooltip=
                "Opens your browser on the README file that contains instructions for how to run this model."
            ), recv, ReadmeCB)

        # main menu
        appnm = gi.AppName()
        mmen = win.MainMenu
        mmen.ConfigMenus(go.Slice_string([appnm, "File", "Edit", "Window"]))

        amen = gi.Action(win.MainMenu.ChildByName(appnm, 0))
        amen.Menu.AddAppMenu(win)

        emen = gi.Action(win.MainMenu.ChildByName("Edit", 1))
        emen.Menu.AddCopyCutPaste(win)

        win.MainMenuUpdated()
        vp.UpdateEndNoSig(updt)
        win.GoStartEventLoop()
Esempio n. 4
0
    def ConfigGui(ss):
        """
        ConfigGui configures the GoGi gui interface for this simulation,
        """
        width = 1600
        height = 1200

        gi.SetAppName("self_org")
        gi.SetAppAbout('illustrates how self-organizing learning emerges from the interactions between inhibitory competition, rich-get-richer Hebbian learning, and homeostasis (negative feedback). See <a href="https://github.com/CompCogNeuro/sims/blob/master/ch4/self_org/README.md">README.md on GitHub</a>.</p>')

        win = gi.NewMainWindow("self_org", "Self Organizing", width, height)
        ss.Win = win

        vp = win.WinViewport2D()
        ss.vp = vp
        updt = vp.UpdateStart()

        mfr = win.SetMainFrame()

        tbar = gi.AddNewToolBar(mfr, "tbar")
        tbar.SetStretchMaxWidth()
        ss.ToolBar = tbar

        split = gi.AddNewSplitView(mfr, "split")
        split.Dim = mat32.X
        split.SetStretchMax()

        cv = ss.NewClassView("sv")
        cv.AddFrame(split)
        cv.Config()

        tv = gi.AddNewTabView(split, "tv")

        nv = netview.NetView()
        tv.AddTab(nv, "NetView")
        nv.Var = "Act"
        nv.SetNet(ss.Net)
        ss.NetView = nv

        plt = eplot.Plot2D()
        tv.AddTab(plt, "TrnEpcPlot")
        ss.TrnEpcPlot = ss.ConfigTrnEpcPlot(plt, ss.TrnEpcLog)

        tg = etview.TensorGrid()
        tv.AddTab(tg, "Weights")
        tg.SetStretchMax()
        ss.WtsGrid = tg
        tg.SetTensor(ss.HidFmInputWts)

        plt = eplot.Plot2D()
        tv.AddTab(plt, "TstTrlPlot")
        ss.TstTrlPlot = ss.ConfigTstTrlPlot(plt, ss.TstTrlLog)

        plt = eplot.Plot2D()
        tv.AddTab(plt, "TstEpcPlot")
        ss.TstEpcPlot = ss.ConfigTstEpcPlot(plt, ss.TstEpcLog)

        plt = eplot.Plot2D()
        tv.AddTab(plt, "RunPlot")
        ss.RunPlot = ss.ConfigRunPlot(plt, ss.RunLog)

        split.SetSplitsList(go.Slice_float32([.2, .8]))

        recv = win.This()
        
        tbar.AddAction(gi.ActOpts(Label="Init", Icon="update", Tooltip="Initialize everything including network weights, and start over.  Also applies current params.", UpdateFunc=UpdtFuncNotRunning), recv, InitCB)

        tbar.AddAction(gi.ActOpts(Label="Train", Icon="run", Tooltip="Starts the network training, picking up from wherever it may have left off.  If not stopped, training will complete the specified number of Runs through the full number of Epochs of training, with testing automatically occuring at the specified interval.", UpdateFunc=UpdtFuncNotRunning), recv, TrainCB)
        
        tbar.AddAction(gi.ActOpts(Label="Stop", Icon="stop", Tooltip="Interrupts running.  Hitting Train again will pick back up where it left off.", UpdateFunc=UpdtFuncRunning), recv, StopCB)
        
        tbar.AddAction(gi.ActOpts(Label="Step Trial", Icon="step-fwd", Tooltip="Advances one training trial at a time.", UpdateFunc=UpdtFuncNotRunning), recv, StepTrialCB)
        
        tbar.AddAction(gi.ActOpts(Label="Step Epoch", Icon="fast-fwd", Tooltip="Advances one epoch (complete set of training patterns) at a time.", UpdateFunc=UpdtFuncNotRunning), recv, StepEpochCB)

        tbar.AddAction(gi.ActOpts(Label="Step Run", Icon="fast-fwd", Tooltip="Advances one full training Run at a time.", UpdateFunc=UpdtFuncNotRunning), recv, StepRunCB)
        
        tbar.AddSeparator("test")
        
        tbar.AddAction(gi.ActOpts(Label="Test Trial", Icon="step-fwd", Tooltip="Runs the next testing trial.", UpdateFunc=UpdtFuncNotRunning), recv, TestTrialCB)
        
        tbar.AddAction(gi.ActOpts(Label="Test Item", Icon="step-fwd", Tooltip="Prompts for a specific input pattern name to run, and runs it in testing mode.", UpdateFunc=UpdtFuncNotRunning), recv, TestItemCB)
        
        tbar.AddAction(gi.ActOpts(Label="Test All", Icon="fast-fwd", Tooltip="Tests all of the testing trials.", UpdateFunc=UpdtFuncNotRunning), recv, TestAllCB)

        tbar.AddSeparator("log")
        
        tbar.AddAction(gi.ActOpts(Label="Reset RunLog", Icon="reset", Tooltip="Resets the accumulated log of all Runs, which are tagged with the ParamSet used"), recv, ResetRunLogCB)

        tbar.AddSeparator("misc")
        
        tbar.AddAction(gi.ActOpts(Label="New Seed", Icon="new", Tooltip="Generate a new initial random seed to get different results.  By default, Init re-establishes the same initial seed every time."), recv, NewRndSeedCB)

        tbar.AddAction(gi.ActOpts(Label="README", Icon="file-markdown", Tooltip="Opens your browser on the README file that contains instructions for how to run this model."), recv, ReadmeCB)
        
        # main menu
        appnm = gi.AppName()
        mmen = win.MainMenu
        mmen.ConfigMenus(go.Slice_string([appnm, "File", "Edit", "Window"]))

        amen = gi.Action(win.MainMenu.ChildByName(appnm, 0))
        amen.Menu.AddAppMenu(win)

        emen = gi.Action(win.MainMenu.ChildByName("Edit", 1))
        emen.Menu.AddCopyCutPaste(win)

        win.MainMenuUpdated()
        vp.UpdateEndNoSig(updt)
        win.GoStartEventLoop()