diff --git a/.gitignore b/.gitignore index f1c181e..3d338d5 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ # Output of the go coverage tool, specifically when used with LiteIDE *.out +midterm26/ssm/ssm diff --git a/ch6/objrec/Objrec b/ch6/objrec/Objrec new file mode 100755 index 0000000..2fb381f Binary files /dev/null and b/ch6/objrec/Objrec differ diff --git a/ch6/objrec/objrec.go b/ch6/objrec/objrec.go index 73321ca..6d29ee4 100644 --- a/ch6/objrec/objrec.go +++ b/ch6/objrec/objrec.go @@ -151,7 +151,7 @@ func (ss *Sim) ConfigEnv() { trn.Name = etime.Train.String() trn.Defaults() trn.MinLED = 0 - trn.MaxLED = 22 // exclude last 2 novel items by default + trn.MaxLED = 21 // exclude last 2 novel items by default if ss.Config.Env.Env != nil { params.ApplyMap(trn, ss.Config.Env.Env, ss.Config.Debug) } @@ -173,7 +173,7 @@ func (ss *Sim) ConfigEnv() { tst.Name = etime.Test.String() tst.Defaults() tst.MinLED = 0 - tst.MaxLED = 24 // all 25 patterns by default + tst.MaxLED = 21 // all 25 patterns by default tst.Trial.Max = 500 // 0 // 1000 is too long! if ss.Config.Env.Env != nil { params.ApplyMap(tst, ss.Config.Env.Env, ss.Config.Debug) diff --git a/ch7/hip/Hip b/ch7/hip/Hip new file mode 100755 index 0000000..1a15087 Binary files /dev/null and b/ch7/hip/Hip differ diff --git a/ch7/hip/a/CPSY1492-Final-Project-main.zip b/ch7/hip/a/CPSY1492-Final-Project-main.zip new file mode 100644 index 0000000..19ca516 Binary files /dev/null and b/ch7/hip/a/CPSY1492-Final-Project-main.zip differ diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/CPSY1492 Final Project Main b/ch7/hip/a/CPSY1492-Final-Project-main/CPSY1492 Final Project Main new file mode 100755 index 0000000..6e4d33c Binary files /dev/null and b/ch7/hip/a/CPSY1492-Final-Project-main/CPSY1492 Final Project Main differ diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/README.md b/ch7/hip/a/CPSY1492-Final-Project-main/README.md new file mode 100644 index 0000000..a6dbf93 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/README.md @@ -0,0 +1,79 @@ +*[Back to simulations](https://compcogneuro.org/simulations)* + +# Introduction + +In this exploration of the hippocampus model, we will use the same basic AB--AC paired associates list learning paradigm as we used in the standard cortical network previously (`abac`). The hippocampus should be able to learn the new paired associates (AC) without causing undue levels of interference to the original AB associations (see Figure 1), and it should be able to do this much more rapidly than was possible in the cortical model. This model is using the _Theremin_ model of [Zheng et al., 2022](#references), which is an updated version of the _Theta Phase_ model of the hippocampus ([Ketz, Morkanda & O'Reilly, 2013](#references)). The EC <-> CA1 projections along with all the other connections have an error-driven learning component organized according to the theta phase rhythm. + +![AB-AC Data](fig_ab_ac_data_catinf.png?raw=true "AB-AC Data") + +**Figure 1:** Data from people learning AB-AC paired associates, and comparable data from McCloskey & Cohen (1989) showing *catastrophic interference* of learning AC on AB. + +* Click on [[sim:TrainAB]] and [[sim:TestAB]] buttons on the left panel to see how the AB training and testing lists are configured. (This may be hard to see in detail.) The "A" pattern is the first three groups of units (at the bottom of each pattern, going left-right, bottom-top), and the "B" pattern is the next three, which you can see most easily in the `Test AB` patterns where these are blank (to be filled in by hippocampal pattern completion). The 2nd half of the pattern is the list context (as in the `abac` project). + +# AB Training and Testing + +Let's observe the process of activation spreading through the network during training. + +* Set the step level (next to [[sim:Step]]) to `Cycle` instead of `Trial`, and do [[sim:Init]], [[sim:Step]] `Cycle`. + +You will see an input pattern from the AB training set presented to the network. As expected, during training, all three parts of the input pattern are presented (A, B, Context). You will see that activation flows from the `ECin` layer through the `DG, CA3` pathway and simultaneously to the `CA1`, so that the sparse `CA3` representation can be associated with the invertible `CA1` representation, which will give back this very `ECin` pattern if later recalled by the `CA3`. You can use the Time VCR buttons in the lower right of the NetView to replay the settling process cycle-by-cycle. + +* Set `Step` back to `Trial` and `Step Trial` through several more (but fewer than 10) training events, and observe the relative amount of pattern overlap between subsequent events on the `ECin, DG, CA3`, and `CA1` layers, by clicking back-and-forth between `ActQ0` (previous trial) and `ActP` (current trial), in the `Phase` group of variables. + +You should have observed that the `ECin` patterns overlap the most, with `CA1` overlapping the next most, then `CA3`, and finally `DG` overlaps the least. The levels of FFFB overall inhibition parallel this result, with DG having a very high level of inhibition, followed by CA3, then CA1, and finally EC. + +> **Question 7.4:** Using the explanation given earlier in the text about the pattern separation mechanism, and the relative levels of activity and inhibition in these different layers, explain the overlap results for each layer in terms of these activity levels, in qualitative terms. + + + +Each epoch of training consists of the 10 list items, followed by testing on 3 sets of testing events. The first testing set contains the AB list items, the second contains the AC list items, and the third contains a set of novel _Lure_ items to make sure the network is treating novel items as such. The network automatically switches over to testing after each pass through the 10 training events. + +* Set `Step` to `Epoch` and `Step Epoch` to step through the rest of the training epoch and then automatically into the testing of the patterns. Switch to the `Train Epoch Plot`, and do `Step Epoch` again so 2 epochs have been run. You should see the `Mem` line rise up, indicating about 50% or so of the items have been accurately remembered. Then switch back to the `Network` tab, set the run mode to `Test` instead of `Train`, then `Init`, change `Step` to `Cycle`, and do `Step Cycle` to see the testing input propagate through the network (be sure to change back to viewing `Act`). + +You should observe that during testing, the input pattern presented to the network is missing the second associate as we saw earlier (the B or C item in the pair), and that as the activation proceeds through the network, it fills in this missing part in the EC layers (pattern completion) as a result of activation flowing up through the `CA3`, and back via the `CA1` to the `ECout`. + +* Click on `Test Trial Plot` tab, and do `Run` in `Test` mode. + +You should see a plot of the overall `Mem` memory statistic for the `AB`, `AC`, and `Lure` items. To see how these memory statistics are scored. First click on the `TrgOnWasOffCmp` line for the plot, which shows how many units in `ECout` in the "comparison" region (where the B or C items are) that were _off_ but should have been _on_. These are the features of B item that the hippocampus needs to recall, and this measure indicates the extent to which it does so, with a high value indicating that the network has failed to recall much of the probe pattern. + +Then click on the `TrgOffWasOn` line, which shows the opposite: any features that were erroneously activated but should have been off. Thus, a large `TrgOffWasOn` indicates that the network has _confabulated_ or otherwise recalled a different pattern than the cued one. When both of these measures are relatively low (below a threshold of .34), then we score the network as having correctly recalled the original pattern (i.e., `Mem` = 1). The threshold on these factors assumes a distributed representation of associate items, such that the entire pattern need not be recalled. + +In general, you should see `TrgOnWasOffCmp` being larger than `TrgOffWasOn` -- the hippocampal network is "high threshold", which accords with extensive data on recollection and recall (see [Norman & O'Reilly, 2003](#references) for more discussion). + +* Click back to `Train` mode instead of `Test`, and do more `Step Epoch` steps to do more learning on the AB items, until all the AB items are getting a `Mem = 1` score. + +> **Question 7.5:** Report the total proportion of `Mem` responses for the AB, AC, and Lure tests. + + + + +# Detailed Testing: Pattern Completion in Action + +Now that the network has learned something, we will go through the testing process in detail by stepping one cycle at a time. + +* Click back on the `Network`, then go back to `Test` mode, then `Init` and then `Step Cycle` so you can see the activation cycle-by-cycle for an AB pattern. + +You should see the studied A stimulus, an empty gap where the B stimulus would be, and a list context representation for the AB list in the `Input` and `ECin`. You will see the network complete the B pattern, which you should be able to see visually as the gap in the `EC` activation pattern gets filled in. You should be able to see that the missing elements are filled in as a result of `CA3` units getting activated. Interestingly, you should also see that as these missing elements start to get filled in, the `ECout` activation feeds back to `ECin` and thus back through the `DG` and `CA3` layers, which can result in a shifting of the overall activation pattern. This is a "big loop" pattern completion process that complements the much quicker (often hard to see) pattern completion within `CA3` itself due to lateral excitatory connections among `CA3` units. + +# AC Training and Interference + +* Select the `Test Epoch Plot` tab, go back to `Train` mode, and restart with `Init` and now do `Step Run`. As in the `abac` model, this will automatically train on AB until your network gets 1 (100% correct) on the `AB Mem` score (during _testing_ -- the `Train Epoch Plot` value shows the results from training which have the complete `B` pattern and are thus much better), and then automatically switch to AC and train until it gets perfect Mem as well. + +You can now observe the amount of interference on AB after training on AC -- it will be some but probably not a catastrophic amount. To get a better sense overall, we need to run multiple samples. + +* Do `Run` to run 10 runs through AB / AC training, and click on the `Train Run Plot` to see the results, with the `Tst*Mem` stats from the testing run. After the 10 runs finish, click on the `RunStats Plot`, which reports summary statistics on the `TstABMem` results. + +> **Question 7.6:** Report the `TstABMem:Mean` (average) values for the AB items. In general the AC and Lure items should all be at 1 and 0 respectively. How well does this result compare to the human results shown in Figure 1? + + + +In summary, you should find that this hippocampal model is able to learn rapidly and with much reduced levels of interference compared to the prior cortical model of this same task. Thus, the specialized biological properties of the hippocampal formation, and its specialized role in episodic memory, can be understood from a computational and functional perspective. + +# References + +* Ketz, N., Morkonda, S. G., & O’Reilly, R. C. (2013). Theta coordinated error-driven learning in the hippocampus. PLoS Computational Biology, 9, e1003067. http://www.ncbi.nlm.nih.gov/pubmed/23762019 [PDF](https://ccnlab.org/papers/KetzMorkondaOReilly13.pdf) + +* Norman, K. A., & O’Reilly, R. C. (2003). Modeling hippocampal and neocortical contributions to recognition memory: A complementary-learning-systems approach. Psychological Review, 110(4), 611–646. [PDF](https://ccnlab.org/papers/NormanOReilly03.pdf) + +* Zheng, Y., Liu, X. L., Nishiyama, S., Ranganath, C., & O’Reilly, R. C. (2022). Correcting the hebbian mistake: Toward a fully error-driven hippocampus. PLOS Computational Biology, 18(10), e1010589. https://doi.org/10.1371/journal.pcbi.1010589 [PDF](https://ccnlab.org/papers/ZhengLiuNishiyamaEtAl22.pdf) + diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/config.toml b/ch7/hip/a/CPSY1492-Final-Project-main/config.toml new file mode 100644 index 0000000..cee8c32 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/config.toml @@ -0,0 +1,8 @@ +NRuns = 10 +NEpochs = 20 +NZero = 1 +TestInterval = 1 +StopMem = 1.0 +OverlapPct = // change % overlap here manually // +PatternFile = " // add pathname here // " +TestPatternFile = " // add pathname here // " \ No newline at end of file diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/fig_ab_ac_data_catinf.png b/ch7/hip/a/CPSY1492-Final-Project-main/fig_ab_ac_data_catinf.png new file mode 100644 index 0000000..0898dcc Binary files /dev/null and b/ch7/hip/a/CPSY1492-Final-Project-main/fig_ab_ac_data_catinf.png differ diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/generate_hip_patterns.py b/ch7/hip/a/CPSY1492-Final-Project-main/generate_hip_patterns.py new file mode 100644 index 0000000..c5091c6 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/generate_hip_patterns.py @@ -0,0 +1,103 @@ +import numpy as np +import pandas as pd +import os + +# ========================= +# CONFIG +# ========================= +N_UNITS = 40 +N_ACTIVE = 10 # choose values that divide nicely into overlap % +N_PATTERNS = 8 + +OVERLAPS = [0, 20, 40, 50, 60, 80] # percent overlap +OUTPUT_DIR = "hip_patterns" + +VERIFY_OVERLAP = True # set to False if you don’t want debug prints + +os.makedirs(OUTPUT_DIR, exist_ok=True) + +# ========================= +# FUNCTIONS +# ========================= + +def generate_base_pattern(n_units, n_active): + pattern = np.zeros(n_units, dtype=int) + active = np.random.choice(n_units, n_active, replace=False) + pattern[active] = 1 + return pattern, active + + +def generate_pattern_from_base(base_pattern, base_active, overlap_pct): + n_active = len(base_active) + n_overlap = int((overlap_pct / 100) * n_active) + + # Shared active units + shared = np.random.choice(base_active, n_overlap, replace=False) + + # New active units + n_new = n_active - n_overlap + available = list(set(range(len(base_pattern))) - set(base_active)) + new_units = np.random.choice(available, n_new, replace=False) + + pattern = np.zeros_like(base_pattern) + pattern[shared] = 1 + pattern[new_units] = 1 + + return pattern + + +def pattern_to_string(pattern): + return " ".join(map(str, pattern)) + + +def compute_overlap(p1, p2): + shared = np.sum((p1 == 1) & (p2 == 1)) + total = np.sum(p1 == 1) + return shared / total if total > 0 else 0 + + +# ========================= +# MAIN GENERATION LOOP +# ========================= + +for overlap in OVERLAPS: + print(f"\n=== Generating {overlap}% overlap dataset ===") + + rows = [] + + base_pattern, base_active = generate_base_pattern(N_UNITS, N_ACTIVE) + patterns = [] + + for i in range(N_PATTERNS): + if i == 0: + p = base_pattern + else: + p = generate_pattern_from_base(base_pattern, base_active, overlap) + + patterns.append(p) + + # Optional: verify overlaps + if VERIFY_OVERLAP: + print("Pairwise overlaps:") + for i in range(len(patterns)): + for j in range(i + 1, len(patterns)): + ov = compute_overlap(patterns[i], patterns[j]) + print(f"P{i+1} vs P{j+1}: {ov:.2f}") + + # Build TSV rows + for i, p in enumerate(patterns): + row = { + "Name": f"P{i+1}", + "Input": pattern_to_string(p), + "ECout": pattern_to_string(p) + } + rows.append(row) + + df = pd.DataFrame(rows) + + filename = os.path.join(OUTPUT_DIR, f"patterns_{overlap}.tsv") + df.to_csv(filename, sep="\t", index=False) + + print(f"Saved: {filename}") + +print("\nAll datasets generated successfully.") \ No newline at end of file diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/hip.go b/ch7/hip/a/CPSY1492-Final-Project-main/hip.go new file mode 100644 index 0000000..b1b8eb8 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/hip.go @@ -0,0 +1,949 @@ +// Copyright (c) 2024, The Emergent Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// hip runs a hippocampus model on the AB-AC paired associate learning task. +package main + +//go:generate core generate -add-types + +import ( + "embed" + "fmt" + "math" + "math/rand" + "reflect" + "strings" + "os" + + "cogentcore.org/core/base/errors" + "cogentcore.org/core/core" + "cogentcore.org/core/enums" + "cogentcore.org/core/icons" + "cogentcore.org/core/tree" + "cogentcore.org/lab/base/randx" + "github.com/emer/emergent/v2/econfig" + "github.com/emer/emergent/v2/egui" + "github.com/emer/emergent/v2/elog" + "github.com/emer/emergent/v2/emer" + "github.com/emer/emergent/v2/env" + "github.com/emer/emergent/v2/estats" + "github.com/emer/emergent/v2/etime" + "github.com/emer/emergent/v2/looper" + "github.com/emer/emergent/v2/netview" + "github.com/emer/emergent/v2/params" + "github.com/emer/emergent/v2/patgen" + "github.com/emer/emergent/v2/paths" + "github.com/emer/etensor/plot/plotcore" + "github.com/emer/etensor/tensor/stats/split" + "github.com/emer/etensor/tensor/table" + "github.com/emer/leabra/v2/leabra" +) + +//go:embed train_ab.tsv train_ac.tsv test_ab.tsv test_ac.tsv test_lure.tsv +var content embed.FS + +//go:embed *.png README.md +var readme embed.FS + +func main() { + sim := &Sim{} + sim.New() + sim.ConfigAll() + sim.RunGUI() +} + +// ParamSets is the default set of parameters -- Base is always applied, and others can be optionally +// selected to apply on top of that +var ParamSets = params.Sets{ + "Base": { + {Sel: "Path", Desc: "keeping default params for generic prjns", + Params: params.Params{ + "Path.Learn.Momentum.On": "true", + "Path.Learn.Norm.On": "true", + "Path.Learn.WtBal.On": "false", + }}, + {Sel: ".EcCa1Path", Desc: "encoder projections -- no norm, moment", + Params: params.Params{ + "Path.Learn.Lrate": "0.04", + "Path.Learn.Momentum.On": "false", + "Path.Learn.Norm.On": "false", + "Path.Learn.WtBal.On": "true", + "Path.Learn.XCal.SetLLrn": "false", // using bcm now, better + }}, + {Sel: ".HippoCHL", Desc: "hippo CHL projections -- no norm, moment, but YES wtbal = sig better", + Params: params.Params{ + "Path.CHL.Hebb": "0.05", + "Path.Learn.Lrate": "0.2", + "Path.Learn.Momentum.On": "false", + "Path.Learn.Norm.On": "false", + "Path.Learn.WtBal.On": "true", + }}, + {Sel: ".PPath", Desc: "perforant path, new Dg error-driven EcCa1Path prjns", + Params: params.Params{ + "Path.Learn.Momentum.On": "false", + "Path.Learn.Norm.On": "false", + "Path.Learn.WtBal.On": "true", + "Path.Learn.Lrate": "0.15", + }}, + {Sel: "#CA1ToECout", Desc: "extra strong from CA1 to ECout", + Params: params.Params{ + "Path.WtScale.Abs": "4.0", + }}, + {Sel: "#InputToECin", Desc: "one-to-one input to EC", + Params: params.Params{ + "Path.Learn.Learn": "false", + "Path.WtInit.Mean": "0.8", + "Path.WtInit.Var": "0.0", + }}, + {Sel: "#ECoutToECin", Desc: "one-to-one out to in", + Params: params.Params{ + "Path.Learn.Learn": "false", + "Path.WtInit.Mean": "0.9", + "Path.WtInit.Var": "0.01", + "Path.WtScale.Rel": "0.5", + }}, + {Sel: "#DGToCA3", Desc: "Mossy fibers: strong, non-learning", + Params: params.Params{ + "Path.Learn.Learn": "false", + "Path.WtInit.Mean": "0.9", + "Path.WtInit.Var": "0.01", + "Path.WtScale.Rel": "4", + }}, + {Sel: "#CA3ToCA3", Desc: "CA3 recurrent cons", + Params: params.Params{ + "Path.WtScale.Rel": "0.1", + "Path.Learn.Lrate": "0.1", + }}, + {Sel: "#ECinToDG", Desc: "DG learning is surprisingly critical: maxed out fast, hebbian works best", + Params: params.Params{ + "Path.Learn.Learn": "true", + "Path.CHL.Hebb": ".5", + "Path.CHL.SAvgCor": "0.1", + "Path.CHL.MinusQ1": "true", + "Path.Learn.Lrate": "0.4", + "Path.Learn.Momentum.On": "false", + "Path.Learn.Norm.On": "false", + "Path.Learn.WtBal.On": "true", + }}, + {Sel: "#CA3ToCA1", Desc: "Schaffer collaterals -- slower, less hebb", + Params: params.Params{ + "Path.CHL.Hebb": "0.01", + "Path.CHL.SAvgCor": "0.4", + "Path.Learn.Lrate": "0.1", + "Path.Learn.Momentum.On": "false", + "Path.Learn.Norm.On": "false", + "Path.Learn.WtBal.On": "true", + }}, + {Sel: ".EC", Desc: "EC layers: layer-level inhibition (2D, no pools)", + Params: params.Params{ + "Layer.Act.Gbar.L": ".1", + "Layer.Inhib.ActAvg.Init": "0.2", + "Layer.Inhib.Layer.On": "true", + "Layer.Inhib.Layer.Gi": "2.0", + "Layer.Inhib.Pool.On": "false", + }}, + {Sel: "#DG", Desc: "very sparse = high inhibition", + Params: params.Params{ + "Layer.Inhib.ActAvg.Init": "0.01", + "Layer.Inhib.Layer.Gi": "3.8", + }}, + {Sel: "#CA3", Desc: "sparse = high inhibition", + Params: params.Params{ + "Layer.Inhib.ActAvg.Init": "0.02", + "Layer.Inhib.Layer.Gi": "2.8", + }}, + {Sel: "#CA1", Desc: "CA1 layer-level inhibition (2D, no pools)", + Params: params.Params{ + "Layer.Inhib.ActAvg.Init": "0.1", + "Layer.Inhib.Layer.On": "true", + "Layer.Inhib.Layer.Gi": "2.4", + "Layer.Inhib.Pool.On": "false", + }}, + }, +} + +// Config has config parameters related to running the sim +type Config struct { + // total number of runs to do when running Train + NRuns int `default:"10" min:"1"` + + // total number of epochs per run + NEpochs int `default:"20"` + + // stop run after this number of perfect, zero-error epochs. + NZero int `default:"1"` + + // how often to run through all the test patterns, in terms of training epochs. + // can use 0 or -1 for no testing. + TestInterval int `default:"1"` + + // StopMem is the threshold for stopping learning. + StopMem float32 `default:"1"` + + // OverlapPct is the percent overlap between stored patterns (0, 20, 40, 50, 60, 80). + // Set this in config.toml for each condition you run. + OverlapPct int `default:"0"` + + // PatternFile is the path to the .tsv file for this overlap condition. + // e.g. "/path/to/patterns_0.tsv" + PatternFile string `default:"patterns_0.tsv"` + + // TestPatternFile is the path to the held-out test .tsv file for this overlap condition. + // e.g. "/path/to/test_patterns_0.tsv" + // The test file should have partial inputs (cue only) with full ECout targets. + TestPatternFile string `default:"test_patterns_0.tsv"` +} + +// Sim encapsulates the entire simulation model, and we define all the +// functionality as methods on this struct. +type Sim struct { + + // simulation configuration parameters -- set by .toml config file and / or args + Config Config `new-window:"+"` + + // the network -- click to view / edit parameters for layers, paths, etc + Net *leabra.Network `new-window:"+" display:"no-inline"` + + // all parameter management + Params emer.NetParams `display:"add-fields"` + + // contains looper control loops for running sim + Loops *looper.Stacks `new-window:"+" display:"no-inline"` + + // contains computed statistic values + Stats estats.Stats `new-window:"+"` + + // Contains all the logs and information about the logs. + Logs elog.Logs `new-window:"+"` + + // if true, run in pretrain mode + PretrainMode bool `display:"-"` + + // pool patterns vocabulary + PoolVocab patgen.Vocab `display:"-"` + + // Training patterns for this overlap condition + TrainAB *table.Table `new-window:"+" display:"no-inline"` + + // AC training patterns (unused in overlap study, kept for compatibility) + TrainAC *table.Table `new-window:"+" display:"no-inline"` + + // AB testing patterns (unused in overlap study, kept for compatibility) + TestAB *table.Table `new-window:"+" display:"no-inline"` + + // AC testing patterns (unused in overlap study, kept for compatibility) + TestAC *table.Table `new-window:"+" display:"no-inline"` + + // Lure testing patterns (unused in overlap study, kept for compatibility) + TestLure *table.Table `new-window:"+" display:"no-inline"` + + // TestAll has the held-out test patterns for this overlap condition. + // These should be partial-cue inputs with full ECout targets. + TestAll *table.Table `new-window:"+" display:"no-inline"` + + // Lure pretrain patterns + PreTrainLure *table.Table `new-window:"+" display:"-"` + + // all training patterns -- for pretrain + TrainAll *table.Table `new-window:"+" display:"-"` + + // Environments + Envs env.Envs `new-window:"+" display:"no-inline"` + + // leabra timing parameters and state + Context leabra.Context `new-window:"+"` + + // netview update parameters + ViewUpdate netview.ViewUpdate `display:"add-fields"` + + // manages all the gui elements + GUI egui.GUI `display:"-"` + + // a list of random seeds to use for each run + RandSeeds randx.Seeds `display:"-"` +} + +// New creates new blank elements and initializes defaults +func (ss *Sim) New() { + econfig.Config(&ss.Config, "config.toml") + + ss.Net = leabra.NewNetwork("Hip") + ss.Params.Config(ParamSets, "", "", ss.Net) + ss.Stats.Init() + ss.Stats.SetInt("Expt", 0) + + ss.PoolVocab = patgen.Vocab{} + ss.TrainAB = &table.Table{} + ss.TrainAC = &table.Table{} + ss.TestAB = &table.Table{} + ss.TestAC = &table.Table{} + ss.PreTrainLure = &table.Table{} + ss.TestLure = &table.Table{} + ss.TrainAll = &table.Table{} + ss.TestAll = &table.Table{} + ss.PretrainMode = false + + ss.RandSeeds.Init(100) // max 100 runs + ss.InitRandSeed(0) + ss.Context.Defaults() +} + +//////////////////////////////////////////////////////////////////////////////////////////// +// Configs + +// ConfigAll configures all the elements using the standard functions +func (ss *Sim) ConfigAll() { + ss.OpenPatterns() + ss.ConfigEnv() + ss.ConfigNet(ss.Net) + ss.ConfigLogs() + ss.ConfigLoops() +} + +func (ss *Sim) ConfigEnv() { + var trn, tst *env.FixedTable + if len(ss.Envs) == 0 { + trn = &env.FixedTable{} + tst = &env.FixedTable{} + } else { + trn = ss.Envs.ByMode(etime.Train).(*env.FixedTable) + tst = ss.Envs.ByMode(etime.Test).(*env.FixedTable) + } + + trn.Name = etime.Train.String() + trn.Config(table.NewIndexView(ss.TrainAB)) + trn.Validate() + + tst.Name = etime.Test.String() + tst.Config(table.NewIndexView(ss.TestAll)) + tst.Sequential = true + tst.Validate() + + trn.Init(0) + tst.Init(0) + + ss.Envs.Add(trn, tst) +} + +func (ss *Sim) ConfigNet(net *leabra.Network) { + net.SetRandSeed(ss.RandSeeds[0]) + + // Layers sized to match your patterns: 40 units each, laid out as [5, 8] (2D). + // Input/ECin/ECout: 5 rows x 8 cols = 40 units (matches your TSV data). + // CA1: slightly larger than EC to allow flexible representations (60 units). + // DG: ~10x EC size for strong pattern separation (400 units, very sparse). + // CA3: ~3x EC size for pattern completion via recurrence (120 units). + in := net.AddLayer2D("Input", 4, 8, leabra.InputLayer) + ecin := net.AddLayer2D("ECin", 4, 8, leabra.SuperLayer) + ecout := net.AddLayer2D("ECout", 4, 8, leabra.TargetLayer) + ca1 := net.AddLayer2D("CA1", 6, 10, leabra.SuperLayer) + dg := net.AddLayer2D("DG", 20, 20, leabra.SuperLayer) + ca3 := net.AddLayer2D("CA3", 10, 12, leabra.SuperLayer) + + ecin.AddClass("EC") + ecout.AddClass("EC") + + onetoone := paths.NewOneToOne() + full := paths.NewFull() + + net.ConnectLayers(in, ecin, onetoone, leabra.ForwardPath) + net.ConnectLayers(ecout, ecin, onetoone, leabra.BackPath) + + // EC <-> CA1: full connectivity (no pools since layers are now 2D) + net.ConnectLayers(ecin, ca1, full, leabra.EcCa1Path) + net.ConnectLayers(ca1, ecout, full, leabra.EcCa1Path) + net.ConnectLayers(ecout, ca1, full, leabra.EcCa1Path) + + ppath := paths.NewUniformRand() + ppath.PCon = 0.25 + + net.ConnectLayers(ecin, dg, ppath, leabra.CHLPath).AddClass("HippoCHL") + net.ConnectLayers(ecin, ca3, ppath, leabra.EcCa1Path).AddClass("PPath") + net.ConnectLayers(ca3, ca3, full, leabra.EcCa1Path).AddClass("PPath") + + mossy := paths.NewUniformRand() + mossy.PCon = 0.02 + net.ConnectLayers(dg, ca3, mossy, leabra.CHLPath).AddClass("HippoCHL") + + net.ConnectLayers(ca3, ca1, full, leabra.CHLPath).AddClass("HippoCHL") + + ecin.PlaceRightOf(in, 2) + ecout.PlaceRightOf(ecin, 2) + dg.PlaceAbove(in) + ca3.PlaceAbove(dg) + ca1.PlaceRightOf(ca3, 2) + + net.Build() + net.Defaults() + ss.ApplyParams() + net.InitWeights() + net.InitTopoScales() +} + +func (ss *Sim) ApplyParams() { + ss.Params.Network = ss.Net + ss.Params.SetAll() +} + +//////////////////////////////////////////////////////////////////////////////// +// Init, utils + +// Init restarts the run, and initializes everything, including network weights +// and resets the epoch log table +func (ss *Sim) Init() { + ss.Stats.SetString("RunName", ss.Params.RunName(0)) + ss.Loops.ResetCounters() + ss.GUI.StopNow = false + ss.ApplyParams() + ss.NewRun() + ss.ViewUpdate.RecordSyns() + ss.ViewUpdate.Update() +} + +func (ss *Sim) TestInit() { + tst := ss.Envs.ByMode(etime.Test).(*env.FixedTable) + tst.Init(0) +} + +// InitRandSeed initializes the random seed based on current training run number +func (ss *Sim) InitRandSeed(run int) { + rand.Seed(ss.RandSeeds[run]) + ss.RandSeeds.Set(run) + ss.RandSeeds.Set(run, &ss.Net.Rand) + patgen.NewRand(ss.RandSeeds[run]) +} + +// ConfigLoops configures the control loops: Training, Testing +func (ss *Sim) ConfigLoops() { + ls := looper.NewStacks() + + trls := ss.TrainAB.Rows + ttrls := ss.TestAll.Rows + + ls.AddStack(etime.Train).AddTime(etime.Run, ss.Config.NRuns).AddTime(etime.Epoch, ss.Config.NEpochs).AddTime(etime.Trial, trls).AddTime(etime.Cycle, 100) + ls.AddStack(etime.Test).AddTime(etime.Epoch, 1).AddTime(etime.Trial, ttrls).AddTime(etime.Cycle, 100) + + leabra.LooperStdPhases(ls, &ss.Context, ss.Net, 75, 99) + leabra.LooperSimCycleAndLearn(ls, ss.Net, &ss.Context, &ss.ViewUpdate) + ss.Net.ConfigLoopsHip(&ss.Context, ls) + + ls.Stacks[etime.Train].OnInit.Add("Init", func() { ss.Init() }) + ls.Stacks[etime.Test].OnInit.Add("Init", func() { ss.TestInit() }) + + for m, _ := range ls.Stacks { + stack := ls.Stacks[m] + stack.Loops[etime.Trial].OnStart.Add("ApplyInputs", func() { + ss.ApplyInputs() + }) + } + + ls.Loop(etime.Train, etime.Run).OnStart.Add("NewRun", ss.NewRun) + + ls.Loop(etime.Train, etime.Run).OnEnd.Add("RunDone", func() { + // Save results at end of each run, tagged with the overlap condition + ss.SaveSummaryCSV("summary_results.csv") + + if ss.Stats.Int("Run") >= ss.Config.NRuns-1 { + ss.RunStats() + expt := ss.Stats.Int("Expt") + ss.Stats.SetInt("Expt", expt+1) + } + }) + + // Run a test pass at the end of every training epoch + trainEpoch := ls.Loop(etime.Train, etime.Epoch) + trainEpoch.OnEnd.Add("TestAtInterval", func() { + if (ss.Config.TestInterval > 0) && ((trainEpoch.Counter.Cur+1)%ss.Config.TestInterval == 0) { + ss.RunTestAll() + } + }) + + // Early stop when ECoutAcc reaches StopMem threshold + ls.Loop(etime.Train, etime.Epoch).IsDone.AddBool("ECoutAccStop", func() bool { + tstEpcLog := ss.Logs.Tables[etime.Scope(etime.Test, etime.Epoch)] + acc := float32(tstEpcLog.Table.Float("ECoutAcc", ss.Stats.Int("Epoch"))) + return acc >= ss.Config.StopMem + }) + + ///////////////////////////////////////////// + // Logging + + ls.Loop(etime.Test, etime.Epoch).OnEnd.Add("LogTestErrors", func() { + leabra.LogTestErrors(&ss.Logs) + }) + + ls.AddOnEndToAll("Log", func(mode, time enums.Enum) { + ss.Log(mode.(etime.Modes), time.(etime.Times)) + }) + leabra.LooperResetLogBelow(ls, &ss.Logs) + + leabra.LooperUpdateNetView(ls, &ss.ViewUpdate, ss.Net, ss.NetViewCounters) + leabra.LooperUpdatePlots(ls, &ss.GUI) + + ls.Stacks[etime.Train].OnInit.Add("GUI-Init", func() { ss.GUI.UpdateWindow() }) + ls.Stacks[etime.Test].OnInit.Add("GUI-Init", func() { ss.GUI.UpdateWindow() }) + + ss.Loops = ls +} + +// ApplyInputs applies input patterns from given environment. +func (ss *Sim) ApplyInputs() { + ctx := &ss.Context + net := ss.Net + ev := ss.Envs.ByMode(ctx.Mode).(*env.FixedTable) + ecout := net.LayerByName("ECout") + + if ctx.Mode == etime.Train { + ecout.Type = leabra.TargetLayer + } else { + ecout.Type = leabra.CompareLayer // don't clamp during test -- network must complete + } + ecout.UpdateExtFlags() + net.InitExt() + lays := net.LayersByType(leabra.InputLayer, leabra.TargetLayer) + ev.Step() + ss.Stats.SetString("TrialName", ev.TrialName.Cur) + for _, lnm := range lays { + ly := ss.Net.LayerByName(lnm) + pats := ev.State(ly.Name) + if pats != nil { + ly.ApplyExt(pats) + } + } +} + +// NewRun initializes a new run of the model +func (ss *Sim) NewRun() { + ctx := &ss.Context + ss.InitRandSeed(ss.Loops.Loop(etime.Train, etime.Run).Counter.Cur) + ss.ConfigEnv() + ctx.Reset() + ctx.Mode = etime.Train + ss.Net.InitWeights() + ss.InitStats() + ss.StatCounters() + ss.Logs.ResetLog(etime.Train, etime.Epoch) + ss.Logs.ResetLog(etime.Test, etime.Epoch) +} + +// TestAll runs through the full set of testing items +func (ss *Sim) RunTestAll() { + ss.Envs.ByMode(etime.Test).Init(0) + ss.Loops.ResetAndRun(etime.Test) + ss.Loops.Mode = etime.Train +} + +///////////////////////////////////////////////////////////////////////// +// Patterns + +// OpenPatAsset opens pattern file from embedded assets +func (ss *Sim) OpenPatAsset(dt *table.Table, fnm, name, desc string) error { + dt.SetMetaData("name", name) + dt.SetMetaData("desc", desc) + err := dt.OpenFS(content, fnm, table.Tab) + if errors.Log(err) == nil { + for i := 1; i < dt.NumColumns(); i++ { + dt.Columns[i].SetMetaData("grid-fill", "0.9") + } + } + return err +} + +func (ss *Sim) OpenPatterns() { + fmt.Printf("Loading training patterns from: %s\n", ss.Config.PatternFile) + err := ss.TrainAB.OpenCSV(core.Filename(ss.Config.PatternFile), table.Tab) + if err != nil { + panic(fmt.Sprintf("Failed to load training patterns from %s: %v", ss.Config.PatternFile, err)) + } + ss.TrainAB.SetMetaData("name", fmt.Sprintf("Train_Overlap%d", ss.Config.OverlapPct)) + fmt.Printf(" Loaded %d training patterns\n", ss.TrainAB.Rows) + + if ss.Config.TestPatternFile != "" { + fmt.Printf("Loading test patterns from: %s\n", ss.Config.TestPatternFile) + err = ss.TestAll.OpenCSV(core.Filename(ss.Config.TestPatternFile), table.Tab) + if err != nil { + fmt.Printf(" WARNING: Could not load test patterns (%v).\n", err) + fmt.Printf(" Falling back to training patterns as test set.\n") + fmt.Printf(" NOTE: This means ECoutAcc measures reproduction, not recall.\n") + ss.TestAll = ss.TrainAB.Clone() + } else { + fmt.Printf(" Loaded %d test patterns\n", ss.TestAll.Rows) + } + } else { + fmt.Printf("No TestPatternFile set -- using training patterns as test set.\n") + fmt.Printf("NOTE: ECoutAcc will measure reproduction, not recall.\n") + ss.TestAll = ss.TrainAB.Clone() + } + ss.TestAll.SetMetaData("name", fmt.Sprintf("Test_Overlap%d", ss.Config.OverlapPct)) +} + +//////////////////////////////////////////////////////////////////////////////////////////// +// Stats + +// InitStats initializes all the statistics. +func (ss *Sim) InitStats() { + ss.Stats.SetString("TrialName", "") + ss.Stats.SetFloat("TrgOnWasOffAll", 0.0) + ss.Stats.SetFloat("TrgOnWasOffCmp", 0.0) + ss.Stats.SetFloat("TrgOffWasOn", 0.0) + ss.Stats.SetFloat("ECoutAcc", 0.0) + ss.Stats.SetFloat("Mem", 0.0) + ss.Stats.SetInt("FirstPerfect", -1) + + ss.Logs.InitErrStats() +} + +// StatCounters saves current counters to Stats +func (ss *Sim) StatCounters() { + ctx := &ss.Context + mode := ctx.Mode + ss.Loops.Stacks[mode].CountersToStats(&ss.Stats) + trnEpc := ss.Loops.Stacks[etime.Train].Loops[etime.Epoch].Counter.Cur + ss.Stats.SetInt("Epoch", trnEpc) + trl := ss.Stats.Int("Trial") + ss.Stats.SetInt("Trial", trl) + ss.Stats.SetInt("Cycle", int(ctx.Cycle)) + ss.Stats.SetString("TrialName", ss.Stats.String("TrialName")) +} + +func (ss *Sim) NetViewCounters(tm etime.Times) { + if ss.ViewUpdate.View == nil { + return + } + if tm == etime.Trial { + ss.TrialStats() + } + ss.StatCounters() + ss.ViewUpdate.Text = ss.Stats.Print([]string{"Run", "Epoch", "Trial", "TrialName", "Cycle"}) +} + +func (ss *Sim) TrialStats() { + ecout := ss.Net.LayerByName("ECout") + + actMi, _ := ecout.UnitVarIndex("ActM") + targi, _ := ecout.UnitVarIndex("Targ") + + actThr := float32(0.5) + correct := 0.0 + total := 0.0 + + for i := 0; i < ecout.Shape.Len(); i++ { + act := ecout.UnitValue1D(actMi, i, 0) + trg := ecout.UnitValue1D(targi, i, 0) + if (act > actThr && trg > actThr) || (act <= actThr && trg <= actThr) { + correct++ + } + total++ + } + + acc := 0.0 + if total > 0 { + acc = correct / total + } + ss.Stats.SetFloat("ECoutAcc", acc) +} + +func (ss *Sim) MemStats(mode etime.Modes) { + memthr := 0.34 + ecout := ss.Net.LayerByName("ECout") + inp := ss.Net.LayerByName("Input") + nn := ecout.Shape.Len() + actThr := float32(0.5) + + trgOnWasOffAll := 0.0 + trgOnWasOffCmp := 0.0 // completion failures + trgOffWasOn := 0.0 // interference / false recall + cmpN := 0.0 + trgOnN := 0.0 + trgOffN := 0.0 + + actMi, _ := ecout.UnitVarIndex("ActM") + targi, _ := ecout.UnitVarIndex("Targ") + + for ni := 0; ni < nn; ni++ { + actm := ecout.UnitValue1D(actMi, ni, 0) + trg := ecout.UnitValue1D(targi, ni, 0) + inact := inp.UnitValue1D(actMi, ni, 0) + + if trg < actThr { // this unit should be OFF + trgOffN++ + if actm > actThr { + trgOffWasOn++ // network turned it ON -- interference error + } + } else { // this unit should be ON + trgOnN++ + if inact < actThr { // ...and it wasn't in the input cue -- must recall from memory + cmpN++ + if actm < actThr { + trgOnWasOffAll++ // network failed to recall it + trgOnWasOffCmp++ // specifically a completion failure + } + } else { + if actm < actThr { + trgOnWasOffAll++ // network failed even though cue provided it + } + } + } + } + + if trgOnN > 0 { + trgOnWasOffAll /= trgOnN + } + if trgOffN > 0 { + trgOffWasOn /= trgOffN + } + + mem := 0.0 + if mode == etime.Train { + // During training, no completion test -- just use ECoutAcc as proxy + mem = ss.Stats.Float("ECoutAcc") + } else { + // During testing: score as remembered only if both error types are low + if cmpN > 0 { + trgOnWasOffCmp /= cmpN + } + if trgOnWasOffCmp < memthr && trgOffWasOn < memthr { + mem = 1.0 + } + } + + ss.Stats.SetFloat("Mem", mem) + ss.Stats.SetFloat("TrgOnWasOffAll", trgOnWasOffAll) + ss.Stats.SetFloat("TrgOnWasOffCmp", trgOnWasOffCmp) + ss.Stats.SetFloat("TrgOffWasOn", trgOffWasOn) +} + +func (ss *Sim) RunStats() { + dt := ss.Logs.Table(etime.Train, etime.Run) + runix := table.NewIndexView(dt) + spl := split.GroupBy(runix, "Expt") + split.DescColumn(spl, "TstMem") + st := spl.AggsToTableCopy(table.AddAggName) + ss.Logs.MiscTables["RunStats"] = st + plt := ss.GUI.Plots[etime.ScopeKey("RunStats")] + + st.SetMetaData("XAxis", "RunName") + st.SetMetaData("Points", "true") + st.SetMetaData("TstMem:Mean:On", "+") + st.SetMetaData("TstMem:Mean:FixMin", "true") + st.SetMetaData("TstMem:Mean:FixMax", "true") + st.SetMetaData("TstMem:Mean:Min", "0") + st.SetMetaData("TstMem:Mean:Max", "1") + st.SetMetaData("TstMem:Min:On", "+") + st.SetMetaData("TstMem:Count:On", "-") + + plt.SetTable(st) + plt.GoUpdatePlot() +} + +func (ss *Sim) SaveSummaryCSV(filename string) { + // Read from the TEST epoch log (not train) so we get genuine test-time metrics + dt := ss.Logs.Table(etime.Test, etime.Epoch) + if dt == nil || dt.Rows == 0 { + fmt.Println("SaveSummaryCSV: no test epoch data available yet") + return + } + + last := dt.Rows - 1 + ecacc := dt.Float("ECoutAcc", last) + cmpFail := dt.Float("TrgOnWasOffCmp", last) // completion failures + interference := dt.Float("TrgOffWasOn", last) // interference errors + mem := dt.Float("Mem", last) + run := ss.Stats.Int("Run") + + fileExists := false + if _, err := os.Stat(filename); err == nil { + fileExists = true + } + + f, err := os.OpenFile(filename, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) + if err != nil { + panic(err) + } + defer f.Close() + + if !fileExists { + f.WriteString("OverlapPct,Run,ECoutAcc,TrgOnWasOffCmp,TrgOffWasOn,Mem\n") + } + + line := fmt.Sprintf("%d,%d,%.4f,%.4f,%.4f,%.4f\n", + ss.Config.OverlapPct, run, ecacc, cmpFail, interference, mem) + f.WriteString(line) + + fmt.Printf("Saved results: Overlap=%d Run=%d ECoutAcc=%.3f CompletionFail=%.3f Interference=%.3f Mem=%.3f\n", + ss.Config.OverlapPct, run, ecacc, cmpFail, interference, mem) +} + +////////////////////////////////////////////////////////////////////////////// +// Logging + +func (ss *Sim) AddLogItems() { + // These items copy test-epoch stats into the train-epoch log for easy plotting + itemNames := []string{"TrgOnWasOffAll", "TrgOnWasOffCmp", "TrgOffWasOn", "Mem", "ECoutAcc"} + for _, st := range itemNames { + stnm := st + tonm := "Tst" + st + ss.Logs.AddItem(&elog.Item{ + Name: tonm, + Type: reflect.Float64, + Write: elog.WriteMap{ + etime.Scope(etime.Train, etime.Epoch): func(ctx *elog.Context) { + ctx.SetFloat64(ctx.ItemFloat(etime.Test, etime.Epoch, stnm)) + }, + etime.Scope(etime.Train, etime.Run): func(ctx *elog.Context) { + ctx.SetFloat64(ctx.ItemFloat(etime.Test, etime.Epoch, stnm)) + }}}) + } +} + +func (ss *Sim) ConfigLogs() { + ss.Stats.SetString("RunName", ss.Params.RunName(0)) + + ss.Logs.AddCounterItems(etime.Run, etime.Epoch, etime.Trial, etime.Cycle) + ss.Logs.AddStatIntNoAggItem(etime.AllModes, etime.AllTimes, "Expt") + ss.Logs.AddStatStringItem(etime.AllModes, etime.AllTimes, "RunName") + ss.Logs.AddStatStringItem(etime.AllModes, etime.Trial, "TrialName") + + // Core stats for the overlap study + ss.Logs.AddStatAggItem("TrgOnWasOffAll", etime.Run, etime.Epoch, etime.Trial) + ss.Logs.AddStatAggItem("TrgOnWasOffCmp", etime.Run, etime.Epoch, etime.Trial) // completion failures + ss.Logs.AddStatAggItem("TrgOffWasOn", etime.Run, etime.Epoch, etime.Trial) // interference errors + ss.Logs.AddStatAggItem("ECoutAcc", etime.Run, etime.Epoch, etime.Trial) + ss.Logs.AddStatAggItem("Mem", etime.Run, etime.Epoch, etime.Trial) + ss.Logs.AddStatIntNoAggItem(etime.Train, etime.Run, "FirstPerfect") + + ss.AddLogItems() + + ss.Logs.AddPerTrlMSec("PerTrlMSec", etime.Run, etime.Epoch, etime.Trial) + + layers := ss.Net.LayersByType(leabra.SuperLayer, leabra.CTLayer, leabra.TargetLayer) + leabra.LogAddDiagnosticItems(&ss.Logs, layers, etime.Train, etime.Epoch, etime.Trial) + leabra.LogInputLayer(&ss.Logs, ss.Net, etime.Train) + + ss.Logs.AddLayerTensorItems(ss.Net, "ActM", etime.Test, etime.Trial, "TargetLayer") + ss.Logs.AddLayerTensorItems(ss.Net, "Act", etime.Test, etime.Trial, "TargetLayer") + + // Plot the most informative metrics for the overlap study + ss.Logs.PlotItems("ECoutAcc", "TrgOnWasOffCmp", "TrgOffWasOn") + + ss.Logs.CreateTables() + + // Train/Run level display settings + ss.Logs.SetMeta(etime.Train, etime.Run, "TstMem:On", "+") + ss.Logs.SetMeta(etime.Train, etime.Run, "TstECoutAcc:On", "+") + ss.Logs.SetMeta(etime.Train, etime.Run, "TstTrgOnWasOffCmp:On", "+") + ss.Logs.SetMeta(etime.Train, etime.Run, "TstTrgOffWasOn:On", "+") + ss.Logs.SetMeta(etime.Train, etime.Run, "Type", "Bar") + + // Train/Epoch level display settings + ss.Logs.SetMeta(etime.Train, etime.Epoch, "ECoutAcc:On", "+") + ss.Logs.SetMeta(etime.Train, etime.Epoch, "TrgOnWasOffCmp:On", "+") + ss.Logs.SetMeta(etime.Train, etime.Epoch, "TrgOffWasOn:On", "+") + ss.Logs.SetMeta(etime.Train, etime.Epoch, "Mem:On", "+") + ss.Logs.SetMeta(etime.Train, etime.Epoch, "TrgOnWasOffAll:On", "-") + + ss.Logs.SetContext(&ss.Stats, ss.Net) + ss.Logs.NoPlot(etime.Train, etime.Cycle) + ss.Logs.NoPlot(etime.Test, etime.Cycle) + ss.Logs.NoPlot(etime.Test, etime.Run) + ss.Logs.SetMeta(etime.Train, etime.Run, "LegendCol", "RunName") +} + +// Log is the main logging function, handles special things for different scopes +func (ss *Sim) Log(mode etime.Modes, time etime.Times) { + ctx := &ss.Context + if mode != etime.Analyze { + ctx.Mode = mode + } + dt := ss.Logs.Table(mode, time) + if dt == nil { + return + } + row := dt.Rows + + switch { + case time == etime.Cycle: + return + case time == etime.Trial: + ss.TrialStats() + ss.MemStats(mode) // ← NOW CALLED: computes TrgOnWasOffCmp, TrgOffWasOn, Mem + ss.StatCounters() + ss.Logs.LogRow(mode, time, row) + return + } + + ss.Logs.LogRow(mode, time, row) +} + +//////////////////////////////////////////////////////////////////////////////////////////// +// Gui + +// ConfigGUI configures the Cogent Core GUI interface for this simulation. +func (ss *Sim) ConfigGUI() { + title := "Hippocampus" + ss.GUI.MakeBody(ss, "hip", title, `runs a hippocampus model on the AB-AC paired associate learning task. See README.md on GitHub.

`, readme) + ss.GUI.CycleUpdateInterval = 10 + + nv := ss.GUI.AddNetView("Network") + nv.Options.Raster.Max = 100 + nv.Options.MaxRecs = 300 + nv.SetNet(ss.Net) + ss.ViewUpdate.Config(nv, etime.Phase, etime.Phase) + ss.GUI.ViewUpdate = &ss.ViewUpdate + + ss.GUI.AddPlots(title, &ss.Logs) + + stnm := "RunStats" + dt := ss.Logs.MiscTable(stnm) + bcp, _ := ss.GUI.Tabs.NewTab(stnm + " Plot") + plt := plotcore.NewSubPlot(bcp) + ss.GUI.Plots[etime.ScopeKey(stnm)] = plt + plt.Options.Title = "Run Stats" + plt.Options.XAxis = "RunName" + plt.SetTable(dt) + + ss.GUI.FinalizeGUI(false) +} + +func (ss *Sim) MakeToolbar(p *tree.Plan) { + ss.GUI.AddLooperCtrl(p, ss.Loops) + + tree.Add(p, func(w *core.Separator) {}) + ss.GUI.AddToolbarItem(p, egui.ToolbarItem{Label: "Reset RunLog", + Icon: icons.Reset, + Tooltip: "Reset the accumulated log of all Runs, which are tagged with the ParamSet used", + Active: egui.ActiveAlways, + Func: func() { + ss.Logs.ResetLog(etime.Train, etime.Run) + ss.GUI.UpdatePlot(etime.Train, etime.Run) + }, + }) + tree.Add(p, func(w *core.Separator) {}) + ss.GUI.AddToolbarItem(p, egui.ToolbarItem{Label: "New Seed", + Icon: icons.Add, + Tooltip: "Generate a new initial random seed to get different results. By default, Init re-establishes the same initial seed every time.", + Active: egui.ActiveAlways, + Func: func() { + ss.RandSeeds.NewSeeds() + }, + }) + ss.GUI.AddToolbarItem(p, egui.ToolbarItem{Label: "README", + Icon: icons.FileMarkdown, + Tooltip: "Opens your browser on the README file that contains instructions for how to run this model.", + Active: egui.ActiveAlways, + Func: func() { + core.TheApp.OpenURL("https://github.com/compcogneuro/sims/blob/master/ch7/hip/README.md") + }, + }) +} + +func (ss *Sim) RunGUI() { + ss.Init() + ss.ConfigGUI() + ss.GUI.Body.RunMainWindow() +} + +// Needed to satisfy interface -- unused in overlap study +var _ = math.NaN +var _ = strings.Contains diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/patterns_0.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/patterns_0.tsv new file mode 100644 index 0000000..a99d05c --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/patterns_0.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %ECout[2:4,1] %ECout[2:4,2] %ECout[2:4,3] %ECout[2:4,4] %ECout[2:4,5] %ECout[2:4,6] %ECout[2:4,7] +_D: P1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +_D: P2 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 +_D: P3 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +_D: P16 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +_D: P17 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 +_D: P18 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +_D: P19 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 +_D: P20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/patterns_20.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/patterns_20.tsv new file mode 100644 index 0000000..83f8065 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/patterns_20.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %ECout[2:4,1] %ECout[2:4,2] %ECout[2:4,3] %ECout[2:4,4] %ECout[2:4,5] %ECout[2:4,6] %ECout[2:4,7] +_D: P1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0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0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/patterns_40.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/patterns_40.tsv new file mode 100644 index 0000000..935c256 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/patterns_40.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 +_D: P19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 +_D: P20 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/patterns_50.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/patterns_50.tsv new file mode 100644 index 0000000..9351377 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/patterns_50.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %ECout[2:4,1] %ECout[2:4,2] %ECout[2:4,3] %ECout[2:4,4] %ECout[2:4,5] %ECout[2:4,6] %ECout[2:4,7] +_D: P1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +_D: P2 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 +_D: P3 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +_D: P4 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 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0 0 0 0 0 0 0 0 0 +_D: P17 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 +_D: P18 0 0 0 1 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +_D: P19 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 +_D: P20 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/patterns_60.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/patterns_60.tsv new file mode 100644 index 0000000..e60bef7 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/patterns_60.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %ECout[2:4,1] %ECout[2:4,2] %ECout[2:4,3] %ECout[2:4,4] %ECout[2:4,5] %ECout[2:4,6] %ECout[2:4,7] +_D: P1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 +_D: P2 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0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CPSY1492-Final-Project-main/hip_patterns/patterns_80.tsv new file mode 100644 index 0000000..a730089 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/patterns_80.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %ECout[2:4,1] %ECout[2:4,2] %ECout[2:4,3] %ECout[2:4,4] %ECout[2:4,5] %ECout[2:4,6] %ECout[2:4,7] +_D: P1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 +_D: P20 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/test_patterns_0.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/test_patterns_0.tsv new file mode 100644 index 0000000..23211cc --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/test_patterns_0.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %EC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0 0 0 +_D: P18 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +_D: P19 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 +_D: P20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/test_patterns_20.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/test_patterns_20.tsv new file mode 100644 index 0000000..c3f8b3a --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/test_patterns_20.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %ECout[2:4,1] %ECout[2:4,2] %ECout[2:4,3] %ECout[2:4,4] %ECout[2:4,5] %ECout[2:4,6] %ECout[2:4,7] +_D: P1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +_D: P2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +_D: P3 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 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 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 +_D: P17 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 +_D: P18 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 +_D: P19 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 +_D: P20 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/test_patterns_40.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/test_patterns_40.tsv new file mode 100644 index 0000000..31d5810 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/test_patterns_40.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %ECout[2:4,1] %ECout[2:4,2] %ECout[2:4,3] %ECout[2:4,4] %ECout[2:4,5] %ECout[2:4,6] %ECout[2:4,7] +_D: P1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 +_D: P2 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0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 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/test_patterns_50.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/test_patterns_50.tsv new file mode 100644 index 0000000..2003e3d --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/test_patterns_50.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %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 0 0 0 0 +_D: P19 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 +_D: P20 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/test_patterns_60.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/test_patterns_60.tsv new file mode 100644 index 0000000..3919bda --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/test_patterns_60.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %ECout[2:4,1] %ECout[2:4,2] %ECout[2:4,3] %ECout[2:4,4] %ECout[2:4,5] %ECout[2:4,6] %ECout[2:4,7] +_D: P1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 +_D: P2 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 +_D: P3 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 +_D: P4 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 +_D: P18 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 +_D: P19 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +_D: P20 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/test_patterns_80.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/test_patterns_80.tsv new file mode 100644 index 0000000..a62b913 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/hip_patterns/test_patterns_80.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %ECout[2:4,1] %ECout[2:4,2] %ECout[2:4,3] %ECout[2:4,4] %ECout[2:4,5] %ECout[2:4,6] %ECout[2:4,7] +_D: P1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 +_D: P2 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 +_D: P3 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0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ip/a/CPSY1492-Final-Project-main/patterns_0.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %ECout[2:4,1] %ECout[2:4,2] %ECout[2:4,3] %ECout[2:4,4] %ECout[2:4,5] %ECout[2:4,6] %ECout[2:4,7] +_D: P1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 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 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/patterns_20.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/patterns_20.tsv new file mode 100644 index 0000000..83f8065 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/patterns_20.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %EC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0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 +_D: P19 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 +_D: P20 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/patterns_40.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/patterns_40.tsv new file mode 100644 index 0000000..935c256 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/patterns_40.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %ECout[2:4,1] %ECout[2:4,2] %ECout[2:4,3] %ECout[2:4,4] %ECout[2:4,5] %ECout[2:4,6] %ECout[2:4,7] +_D: P1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 +_D: P2 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 +_D: P3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 1 0 +_D: P4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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D: P17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 +_D: P18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 +_D: P19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 +_D: P20 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/patterns_50.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/patterns_50.tsv new file mode 100644 index 0000000..9351377 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/patterns_50.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %ECout[2:4,1] %ECout[2:4,2] %ECout[2:4,3] %ECout[2:4,4] %ECout[2:4,5] %ECout[2:4,6] %ECout[2:4,7] +_D: P1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +_D: P2 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 +_D: P3 0 0 0 0 1 0 0 0 0 0 0 0 0 0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null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/patterns_60.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %ECout[2:4,1] %ECout[2:4,2] %ECout[2:4,3] %ECout[2:4,4] %ECout[2:4,5] %ECout[2:4,6] %ECout[2:4,7] +_D: P1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0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0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/patterns_80.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/patterns_80.tsv new file mode 100644 index 0000000..a730089 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/patterns_80.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout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0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 +_D: P19 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 +_D: P20 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/summary_results.csv b/ch7/hip/a/CPSY1492-Final-Project-main/summary_results.csv new file mode 100644 index 0000000..7c01201 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/summary_results.csv @@ -0,0 +1,2 @@ +OverlapPct,Run,ECoutAcc,TrgOnWasOffCmp,TrgOffWasOn,Mem +0,0,0.7313,0.2833,0.2500,0.5500 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/test_ab.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/test_ab.tsv new file mode 100644 index 0000000..122e37c --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/test_ab.tsv @@ -0,0 +1,11 @@ +_H: $Name %Input[4:0,0,0,0]<4:6,2,3,4> %Input[4:0,0,0,1] %Input[4:0,0,0,2] %Input[4:0,0,0,3] %Input[4:0,0,1,0] %Input[4:0,0,1,1] %Input[4:0,0,1,2] %Input[4:0,0,1,3] %Input[4:0,0,2,0] %Input[4:0,0,2,1] %Input[4:0,0,2,2] %Input[4:0,0,2,3] %Input[4:0,1,0,0] %Input[4:0,1,0,1] %Input[4:0,1,0,2] %Input[4:0,1,0,3] %Input[4:0,1,1,0] %Input[4:0,1,1,1] %Input[4:0,1,1,2] %Input[4:0,1,1,3] %Input[4:0,1,2,0] %Input[4:0,1,2,1] %Input[4:0,1,2,2] %Input[4:0,1,2,3] %Input[4:1,0,0,0] %Input[4:1,0,0,1] %Input[4:1,0,0,2] %Input[4:1,0,0,3] %Input[4:1,0,1,0] %Input[4:1,0,1,1] %Input[4:1,0,1,2] %Input[4:1,0,1,3] %Input[4:1,0,2,0] %Input[4:1,0,2,1] %Input[4:1,0,2,2] %Input[4:1,0,2,3] %Input[4:1,1,0,0] %Input[4:1,1,0,1] %Input[4:1,1,0,2] %Input[4:1,1,0,3] %Input[4:1,1,1,0] %Input[4:1,1,1,1] %Input[4:1,1,1,2] %Input[4:1,1,1,3] %Input[4:1,1,2,0] %Input[4:1,1,2,1] %Input[4:1,1,2,2] %Input[4:1,1,2,3] %Input[4:2,0,0,0] %Input[4:2,0,0,1] %Input[4:2,0,0,2] %Input[4:2,0,0,3] %Input[4:2,0,1,0] %Input[4:2,0,1,1] %Input[4:2,0,1,2] %Input[4:2,0,1,3] %Input[4:2,0,2,0] %Input[4:2,0,2,1] %Input[4:2,0,2,2] %Input[4:2,0,2,3] %Input[4:2,1,0,0] %Input[4:2,1,0,1] %Input[4:2,1,0,2] %Input[4:2,1,0,3] %Input[4:2,1,1,0] %Input[4:2,1,1,1] %Input[4:2,1,1,2] %Input[4:2,1,1,3] %Input[4:2,1,2,0] %Input[4:2,1,2,1] %Input[4:2,1,2,2] %Input[4:2,1,2,3] %Input[4:3,0,0,0] %Input[4:3,0,0,1] %Input[4:3,0,0,2] %Input[4:3,0,0,3] %Input[4:3,0,1,0] %Input[4:3,0,1,1] %Input[4:3,0,1,2] %Input[4:3,0,1,3] %Input[4:3,0,2,0] %Input[4:3,0,2,1] %Input[4:3,0,2,2] %Input[4:3,0,2,3] %Input[4:3,1,0,0] %Input[4:3,1,0,1] %Input[4:3,1,0,2] %Input[4:3,1,0,3] %Input[4:3,1,1,0] %Input[4:3,1,1,1] %Input[4:3,1,1,2] %Input[4:3,1,1,3] %Input[4:3,1,2,0] %Input[4:3,1,2,1] %Input[4:3,1,2,2] %Input[4:3,1,2,3] %Input[4:4,0,0,0] %Input[4:4,0,0,1] %Input[4:4,0,0,2] %Input[4:4,0,0,3] %Input[4:4,0,1,0] %Input[4:4,0,1,1] %Input[4:4,0,1,2] %Input[4:4,0,1,3] %Input[4:4,0,2,0] %Input[4:4,0,2,1] %Input[4:4,0,2,2] %Input[4:4,0,2,3] %Input[4:4,1,0,0] %Input[4:4,1,0,1] %Input[4:4,1,0,2] %Input[4:4,1,0,3] %Input[4:4,1,1,0] %Input[4:4,1,1,1] %Input[4:4,1,1,2] %Input[4:4,1,1,3] %Input[4:4,1,2,0] %Input[4:4,1,2,1] %Input[4:4,1,2,2] %Input[4:4,1,2,3] %Input[4:5,0,0,0] %Input[4:5,0,0,1] %Input[4:5,0,0,2] %Input[4:5,0,0,3] %Input[4:5,0,1,0] %Input[4:5,0,1,1] %Input[4:5,0,1,2] %Input[4:5,0,1,3] %Input[4:5,0,2,0] %Input[4:5,0,2,1] %Input[4:5,0,2,2] %Input[4:5,0,2,3] %Input[4:5,1,0,0] %Input[4:5,1,0,1] %Input[4:5,1,0,2] %Input[4:5,1,0,3] %Input[4:5,1,1,0] %Input[4:5,1,1,1] %Input[4:5,1,1,2] %Input[4:5,1,1,3] %Input[4:5,1,2,0] %Input[4:5,1,2,1] %Input[4:5,1,2,2] %Input[4:5,1,2,3] %ECout[4:0,0,0,0]<4:6,2,3,4> %ECout[4:0,0,0,1] %ECout[4:0,0,0,2] %ECout[4:0,0,0,3] %ECout[4:0,0,1,0] %ECout[4:0,0,1,1] %ECout[4:0,0,1,2] %ECout[4:0,0,1,3] %ECout[4:0,0,2,0] %ECout[4:0,0,2,1] %ECout[4:0,0,2,2] %ECout[4:0,0,2,3] %ECout[4:0,1,0,0] %ECout[4:0,1,0,1] %ECout[4:0,1,0,2] %ECout[4:0,1,0,3] %ECout[4:0,1,1,0] %ECout[4:0,1,1,1] %ECout[4:0,1,1,2] %ECout[4:0,1,1,3] %ECout[4:0,1,2,0] %ECout[4:0,1,2,1] %ECout[4:0,1,2,2] %ECout[4:0,1,2,3] %ECout[4:1,0,0,0] %ECout[4:1,0,0,1] %ECout[4:1,0,0,2] %ECout[4:1,0,0,3] %ECout[4:1,0,1,0] %ECout[4:1,0,1,1] %ECout[4:1,0,1,2] %ECout[4:1,0,1,3] %ECout[4:1,0,2,0] %ECout[4:1,0,2,1] %ECout[4:1,0,2,2] %ECout[4:1,0,2,3] %ECout[4:1,1,0,0] %ECout[4:1,1,0,1] %ECout[4:1,1,0,2] %ECout[4:1,1,0,3] %ECout[4:1,1,1,0] %ECout[4:1,1,1,1] %ECout[4:1,1,1,2] %ECout[4:1,1,1,3] %ECout[4:1,1,2,0] %ECout[4:1,1,2,1] %ECout[4:1,1,2,2] %ECout[4:1,1,2,3] %ECout[4:2,0,0,0] %ECout[4:2,0,0,1] %ECout[4:2,0,0,2] %ECout[4:2,0,0,3] %ECout[4:2,0,1,0] %ECout[4:2,0,1,1] %ECout[4:2,0,1,2] %ECout[4:2,0,1,3] %ECout[4:2,0,2,0] %ECout[4:2,0,2,1] %ECout[4:2,0,2,2] %ECout[4:2,0,2,3] %ECout[4:2,1,0,0] %ECout[4:2,1,0,1] %ECout[4:2,1,0,2] %ECout[4:2,1,0,3] %ECout[4:2,1,1,0] %ECout[4:2,1,1,1] %ECout[4:2,1,1,2] %ECout[4:2,1,1,3] %ECout[4:2,1,2,0] %ECout[4:2,1,2,1] %ECout[4:2,1,2,2] %ECout[4:2,1,2,3] %ECout[4:3,0,0,0] %ECout[4:3,0,0,1] %ECout[4:3,0,0,2] %ECout[4:3,0,0,3] %ECout[4:3,0,1,0] %ECout[4:3,0,1,1] %ECout[4:3,0,1,2] %ECout[4:3,0,1,3] %ECout[4:3,0,2,0] %ECout[4:3,0,2,1] %ECout[4:3,0,2,2] %ECout[4:3,0,2,3] %ECout[4:3,1,0,0] %ECout[4:3,1,0,1] %ECout[4:3,1,0,2] %ECout[4:3,1,0,3] %ECout[4:3,1,1,0] %ECout[4:3,1,1,1] %ECout[4:3,1,1,2] %ECout[4:3,1,1,3] %ECout[4:3,1,2,0] %ECout[4:3,1,2,1] %ECout[4:3,1,2,2] %ECout[4:3,1,2,3] %ECout[4:4,0,0,0] %ECout[4:4,0,0,1] %ECout[4:4,0,0,2] %ECout[4:4,0,0,3] %ECout[4:4,0,1,0] %ECout[4:4,0,1,1] %ECout[4:4,0,1,2] %ECout[4:4,0,1,3] %ECout[4:4,0,2,0] %ECout[4:4,0,2,1] %ECout[4:4,0,2,2] %ECout[4:4,0,2,3] %ECout[4:4,1,0,0] %ECout[4:4,1,0,1] %ECout[4:4,1,0,2] %ECout[4:4,1,0,3] %ECout[4:4,1,1,0] %ECout[4:4,1,1,1] %ECout[4:4,1,1,2] %ECout[4:4,1,1,3] %ECout[4:4,1,2,0] %ECout[4:4,1,2,1] %ECout[4:4,1,2,2] %ECout[4:4,1,2,3] %ECout[4:5,0,0,0] %ECout[4:5,0,0,1] %ECout[4:5,0,0,2] %ECout[4:5,0,0,3] %ECout[4:5,0,1,0] %ECout[4:5,0,1,1] %ECout[4:5,0,1,2] %ECout[4:5,0,1,3] %ECout[4:5,0,2,0] %ECout[4:5,0,2,1] %ECout[4:5,0,2,2] %ECout[4:5,0,2,3] %ECout[4:5,1,0,0] %ECout[4:5,1,0,1] %ECout[4:5,1,0,2] %ECout[4:5,1,0,3] %ECout[4:5,1,1,0] %ECout[4:5,1,1,1] %ECout[4:5,1,1,2] %ECout[4:5,1,1,3] %ECout[4:5,1,2,0] %ECout[4:5,1,2,1] %ECout[4:5,1,2,2] %ECout[4:5,1,2,3] +_D: ab_0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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0 1 0 0 0 0 1 0 +_D: ab_9 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/test_ac.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/test_ac.tsv new file mode 100644 index 0000000..82ced17 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/test_ac.tsv @@ -0,0 +1,11 @@ +_H: $Name %Input[4:0,0,0,0]<4:6,2,3,4> %Input[4:0,0,0,1] %Input[4:0,0,0,2] %Input[4:0,0,0,3] %Input[4:0,0,1,0] %Input[4:0,0,1,1] %Input[4:0,0,1,2] %Input[4:0,0,1,3] %Input[4:0,0,2,0] %Input[4:0,0,2,1] %Input[4:0,0,2,2] %Input[4:0,0,2,3] %Input[4:0,1,0,0] %Input[4:0,1,0,1] %Input[4:0,1,0,2] %Input[4:0,1,0,3] %Input[4:0,1,1,0] %Input[4:0,1,1,1] %Input[4:0,1,1,2] %Input[4:0,1,1,3] %Input[4:0,1,2,0] %Input[4:0,1,2,1] %Input[4:0,1,2,2] %Input[4:0,1,2,3] %Input[4:1,0,0,0] %Input[4:1,0,0,1] %Input[4:1,0,0,2] %Input[4:1,0,0,3] %Input[4:1,0,1,0] %Input[4:1,0,1,1] %Input[4:1,0,1,2] %Input[4:1,0,1,3] %Input[4:1,0,2,0] %Input[4:1,0,2,1] %Input[4:1,0,2,2] %Input[4:1,0,2,3] %Input[4:1,1,0,0] %Input[4:1,1,0,1] %Input[4:1,1,0,2] %Input[4:1,1,0,3] %Input[4:1,1,1,0] %Input[4:1,1,1,1] %Input[4:1,1,1,2] %Input[4:1,1,1,3] %Input[4:1,1,2,0] %Input[4:1,1,2,1] %Input[4:1,1,2,2] %Input[4:1,1,2,3] %Input[4:2,0,0,0] %Input[4:2,0,0,1] %Input[4:2,0,0,2] %Input[4:2,0,0,3] %Input[4:2,0,1,0] %Input[4:2,0,1,1] %Input[4:2,0,1,2] %Input[4:2,0,1,3] %Input[4:2,0,2,0] %Input[4:2,0,2,1] %Input[4:2,0,2,2] %Input[4:2,0,2,3] %Input[4:2,1,0,0] %Input[4:2,1,0,1] %Input[4:2,1,0,2] %Input[4:2,1,0,3] %Input[4:2,1,1,0] %Input[4:2,1,1,1] %Input[4:2,1,1,2] %Input[4:2,1,1,3] %Input[4:2,1,2,0] %Input[4:2,1,2,1] %Input[4:2,1,2,2] %Input[4:2,1,2,3] %Input[4:3,0,0,0] %Input[4:3,0,0,1] %Input[4:3,0,0,2] %Input[4:3,0,0,3] %Input[4:3,0,1,0] %Input[4:3,0,1,1] %Input[4:3,0,1,2] %Input[4:3,0,1,3] %Input[4:3,0,2,0] %Input[4:3,0,2,1] %Input[4:3,0,2,2] %Input[4:3,0,2,3] %Input[4:3,1,0,0] %Input[4:3,1,0,1] %Input[4:3,1,0,2] %Input[4:3,1,0,3] %Input[4:3,1,1,0] %Input[4:3,1,1,1] %Input[4:3,1,1,2] %Input[4:3,1,1,3] %Input[4:3,1,2,0] %Input[4:3,1,2,1] %Input[4:3,1,2,2] %Input[4:3,1,2,3] %Input[4:4,0,0,0] %Input[4:4,0,0,1] %Input[4:4,0,0,2] %Input[4:4,0,0,3] %Input[4:4,0,1,0] %Input[4:4,0,1,1] %Input[4:4,0,1,2] %Input[4:4,0,1,3] %Input[4:4,0,2,0] %Input[4:4,0,2,1] %Input[4:4,0,2,2] %Input[4:4,0,2,3] %Input[4:4,1,0,0] %Input[4:4,1,0,1] %Input[4:4,1,0,2] %Input[4:4,1,0,3] %Input[4:4,1,1,0] %Input[4:4,1,1,1] %Input[4:4,1,1,2] %Input[4:4,1,1,3] %Input[4:4,1,2,0] %Input[4:4,1,2,1] %Input[4:4,1,2,2] %Input[4:4,1,2,3] %Input[4:5,0,0,0] %Input[4:5,0,0,1] %Input[4:5,0,0,2] %Input[4:5,0,0,3] %Input[4:5,0,1,0] %Input[4:5,0,1,1] %Input[4:5,0,1,2] %Input[4:5,0,1,3] %Input[4:5,0,2,0] %Input[4:5,0,2,1] %Input[4:5,0,2,2] %Input[4:5,0,2,3] %Input[4:5,1,0,0] %Input[4:5,1,0,1] %Input[4:5,1,0,2] %Input[4:5,1,0,3] %Input[4:5,1,1,0] %Input[4:5,1,1,1] %Input[4:5,1,1,2] %Input[4:5,1,1,3] %Input[4:5,1,2,0] %Input[4:5,1,2,1] %Input[4:5,1,2,2] %Input[4:5,1,2,3] %ECout[4:0,0,0,0]<4:6,2,3,4> %ECout[4:0,0,0,1] %ECout[4:0,0,0,2] %ECout[4:0,0,0,3] %ECout[4:0,0,1,0] %ECout[4:0,0,1,1] %ECout[4:0,0,1,2] %ECout[4:0,0,1,3] %ECout[4:0,0,2,0] %ECout[4:0,0,2,1] %ECout[4:0,0,2,2] %ECout[4:0,0,2,3] %ECout[4:0,1,0,0] %ECout[4:0,1,0,1] %ECout[4:0,1,0,2] %ECout[4:0,1,0,3] %ECout[4:0,1,1,0] %ECout[4:0,1,1,1] %ECout[4:0,1,1,2] %ECout[4:0,1,1,3] %ECout[4:0,1,2,0] %ECout[4:0,1,2,1] %ECout[4:0,1,2,2] %ECout[4:0,1,2,3] %ECout[4:1,0,0,0] %ECout[4:1,0,0,1] %ECout[4:1,0,0,2] %ECout[4:1,0,0,3] %ECout[4:1,0,1,0] %ECout[4:1,0,1,1] %ECout[4:1,0,1,2] %ECout[4:1,0,1,3] %ECout[4:1,0,2,0] %ECout[4:1,0,2,1] %ECout[4:1,0,2,2] %ECout[4:1,0,2,3] %ECout[4:1,1,0,0] %ECout[4:1,1,0,1] %ECout[4:1,1,0,2] %ECout[4:1,1,0,3] %ECout[4:1,1,1,0] %ECout[4:1,1,1,1] %ECout[4:1,1,1,2] %ECout[4:1,1,1,3] %ECout[4:1,1,2,0] %ECout[4:1,1,2,1] %ECout[4:1,1,2,2] %ECout[4:1,1,2,3] %ECout[4:2,0,0,0] %ECout[4:2,0,0,1] %ECout[4:2,0,0,2] %ECout[4:2,0,0,3] %ECout[4:2,0,1,0] %ECout[4:2,0,1,1] %ECout[4:2,0,1,2] %ECout[4:2,0,1,3] %ECout[4:2,0,2,0] %ECout[4:2,0,2,1] %ECout[4:2,0,2,2] %ECout[4:2,0,2,3] %ECout[4:2,1,0,0] %ECout[4:2,1,0,1] %ECout[4:2,1,0,2] %ECout[4:2,1,0,3] %ECout[4:2,1,1,0] %ECout[4:2,1,1,1] %ECout[4:2,1,1,2] %ECout[4:2,1,1,3] %ECout[4:2,1,2,0] %ECout[4:2,1,2,1] %ECout[4:2,1,2,2] %ECout[4:2,1,2,3] %ECout[4:3,0,0,0] %ECout[4:3,0,0,1] %ECout[4:3,0,0,2] %ECout[4:3,0,0,3] %ECout[4:3,0,1,0] %ECout[4:3,0,1,1] %ECout[4:3,0,1,2] %ECout[4:3,0,1,3] %ECout[4:3,0,2,0] %ECout[4:3,0,2,1] %ECout[4:3,0,2,2] %ECout[4:3,0,2,3] %ECout[4:3,1,0,0] %ECout[4:3,1,0,1] %ECout[4:3,1,0,2] %ECout[4:3,1,0,3] %ECout[4:3,1,1,0] %ECout[4:3,1,1,1] %ECout[4:3,1,1,2] %ECout[4:3,1,1,3] %ECout[4:3,1,2,0] %ECout[4:3,1,2,1] %ECout[4:3,1,2,2] %ECout[4:3,1,2,3] %ECout[4:4,0,0,0] %ECout[4:4,0,0,1] %ECout[4:4,0,0,2] %ECout[4:4,0,0,3] %ECout[4:4,0,1,0] %ECout[4:4,0,1,1] %ECout[4:4,0,1,2] %ECout[4:4,0,1,3] %ECout[4:4,0,2,0] %ECout[4:4,0,2,1] %ECout[4:4,0,2,2] %ECout[4:4,0,2,3] %ECout[4:4,1,0,0] %ECout[4:4,1,0,1] %ECout[4:4,1,0,2] %ECout[4:4,1,0,3] %ECout[4:4,1,1,0] %ECout[4:4,1,1,1] %ECout[4:4,1,1,2] %ECout[4:4,1,1,3] %ECout[4:4,1,2,0] %ECout[4:4,1,2,1] %ECout[4:4,1,2,2] %ECout[4:4,1,2,3] %ECout[4:5,0,0,0] %ECout[4:5,0,0,1] %ECout[4:5,0,0,2] %ECout[4:5,0,0,3] %ECout[4:5,0,1,0] %ECout[4:5,0,1,1] %ECout[4:5,0,1,2] %ECout[4:5,0,1,3] %ECout[4:5,0,2,0] %ECout[4:5,0,2,1] %ECout[4:5,0,2,2] %ECout[4:5,0,2,3] %ECout[4:5,1,0,0] %ECout[4:5,1,0,1] %ECout[4:5,1,0,2] %ECout[4:5,1,0,3] %ECout[4:5,1,1,0] %ECout[4:5,1,1,1] %ECout[4:5,1,1,2] %ECout[4:5,1,1,3] %ECout[4:5,1,2,0] %ECout[4:5,1,2,1] %ECout[4:5,1,2,2] %ECout[4:5,1,2,3] +_D: ac_0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 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 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/test_lure.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/test_lure.tsv new file mode 100644 index 0000000..da48a2c --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/test_lure.tsv @@ -0,0 +1,11 @@ +_H: $Name %Input[4:0,0,0,0]<4:6,2,3,4> %Input[4:0,0,0,1] %Input[4:0,0,0,2] %Input[4:0,0,0,3] %Input[4:0,0,1,0] %Input[4:0,0,1,1] %Input[4:0,0,1,2] %Input[4:0,0,1,3] %Input[4:0,0,2,0] %Input[4:0,0,2,1] %Input[4:0,0,2,2] %Input[4:0,0,2,3] %Input[4:0,1,0,0] %Input[4:0,1,0,1] %Input[4:0,1,0,2] %Input[4:0,1,0,3] %Input[4:0,1,1,0] %Input[4:0,1,1,1] %Input[4:0,1,1,2] %Input[4:0,1,1,3] %Input[4:0,1,2,0] %Input[4:0,1,2,1] %Input[4:0,1,2,2] %Input[4:0,1,2,3] %Input[4:1,0,0,0] %Input[4:1,0,0,1] %Input[4:1,0,0,2] %Input[4:1,0,0,3] %Input[4:1,0,1,0] %Input[4:1,0,1,1] %Input[4:1,0,1,2] %Input[4:1,0,1,3] %Input[4:1,0,2,0] %Input[4:1,0,2,1] %Input[4:1,0,2,2] %Input[4:1,0,2,3] %Input[4:1,1,0,0] %Input[4:1,1,0,1] %Input[4:1,1,0,2] %Input[4:1,1,0,3] %Input[4:1,1,1,0] %Input[4:1,1,1,1] %Input[4:1,1,1,2] %Input[4:1,1,1,3] %Input[4:1,1,2,0] %Input[4:1,1,2,1] %Input[4:1,1,2,2] %Input[4:1,1,2,3] %Input[4:2,0,0,0] %Input[4:2,0,0,1] %Input[4:2,0,0,2] %Input[4:2,0,0,3] %Input[4:2,0,1,0] %Input[4:2,0,1,1] %Input[4:2,0,1,2] %Input[4:2,0,1,3] %Input[4:2,0,2,0] %Input[4:2,0,2,1] %Input[4:2,0,2,2] %Input[4:2,0,2,3] %Input[4:2,1,0,0] %Input[4:2,1,0,1] %Input[4:2,1,0,2] %Input[4:2,1,0,3] %Input[4:2,1,1,0] %Input[4:2,1,1,1] %Input[4:2,1,1,2] %Input[4:2,1,1,3] %Input[4:2,1,2,0] %Input[4:2,1,2,1] %Input[4:2,1,2,2] %Input[4:2,1,2,3] %Input[4:3,0,0,0] %Input[4:3,0,0,1] %Input[4:3,0,0,2] %Input[4:3,0,0,3] %Input[4:3,0,1,0] %Input[4:3,0,1,1] %Input[4:3,0,1,2] %Input[4:3,0,1,3] %Input[4:3,0,2,0] %Input[4:3,0,2,1] %Input[4:3,0,2,2] %Input[4:3,0,2,3] %Input[4:3,1,0,0] %Input[4:3,1,0,1] %Input[4:3,1,0,2] %Input[4:3,1,0,3] %Input[4:3,1,1,0] %Input[4:3,1,1,1] %Input[4:3,1,1,2] %Input[4:3,1,1,3] %Input[4:3,1,2,0] %Input[4:3,1,2,1] %Input[4:3,1,2,2] %Input[4:3,1,2,3] %Input[4:4,0,0,0] %Input[4:4,0,0,1] %Input[4:4,0,0,2] %Input[4:4,0,0,3] %Input[4:4,0,1,0] %Input[4:4,0,1,1] %Input[4:4,0,1,2] %Input[4:4,0,1,3] %Input[4:4,0,2,0] %Input[4:4,0,2,1] %Input[4:4,0,2,2] %Input[4:4,0,2,3] %Input[4:4,1,0,0] %Input[4:4,1,0,1] %Input[4:4,1,0,2] %Input[4:4,1,0,3] %Input[4:4,1,1,0] %Input[4:4,1,1,1] %Input[4:4,1,1,2] %Input[4:4,1,1,3] %Input[4:4,1,2,0] %Input[4:4,1,2,1] %Input[4:4,1,2,2] %Input[4:4,1,2,3] %Input[4:5,0,0,0] %Input[4:5,0,0,1] %Input[4:5,0,0,2] %Input[4:5,0,0,3] %Input[4:5,0,1,0] %Input[4:5,0,1,1] %Input[4:5,0,1,2] %Input[4:5,0,1,3] %Input[4:5,0,2,0] %Input[4:5,0,2,1] %Input[4:5,0,2,2] %Input[4:5,0,2,3] %Input[4:5,1,0,0] %Input[4:5,1,0,1] %Input[4:5,1,0,2] %Input[4:5,1,0,3] %Input[4:5,1,1,0] %Input[4:5,1,1,1] %Input[4:5,1,1,2] %Input[4:5,1,1,3] %Input[4:5,1,2,0] %Input[4:5,1,2,1] %Input[4:5,1,2,2] %Input[4:5,1,2,3] %ECout[4:0,0,0,0]<4:6,2,3,4> %ECout[4:0,0,0,1] %ECout[4:0,0,0,2] %ECout[4:0,0,0,3] %ECout[4:0,0,1,0] %ECout[4:0,0,1,1] %ECout[4:0,0,1,2] %ECout[4:0,0,1,3] %ECout[4:0,0,2,0] %ECout[4:0,0,2,1] %ECout[4:0,0,2,2] %ECout[4:0,0,2,3] %ECout[4:0,1,0,0] %ECout[4:0,1,0,1] %ECout[4:0,1,0,2] %ECout[4:0,1,0,3] %ECout[4:0,1,1,0] %ECout[4:0,1,1,1] %ECout[4:0,1,1,2] %ECout[4:0,1,1,3] %ECout[4:0,1,2,0] %ECout[4:0,1,2,1] %ECout[4:0,1,2,2] %ECout[4:0,1,2,3] %ECout[4:1,0,0,0] %ECout[4:1,0,0,1] %ECout[4:1,0,0,2] %ECout[4:1,0,0,3] %ECout[4:1,0,1,0] %ECout[4:1,0,1,1] %ECout[4:1,0,1,2] %ECout[4:1,0,1,3] %ECout[4:1,0,2,0] %ECout[4:1,0,2,1] %ECout[4:1,0,2,2] %ECout[4:1,0,2,3] %ECout[4:1,1,0,0] %ECout[4:1,1,0,1] %ECout[4:1,1,0,2] %ECout[4:1,1,0,3] %ECout[4:1,1,1,0] %ECout[4:1,1,1,1] %ECout[4:1,1,1,2] %ECout[4:1,1,1,3] %ECout[4:1,1,2,0] %ECout[4:1,1,2,1] %ECout[4:1,1,2,2] %ECout[4:1,1,2,3] %ECout[4:2,0,0,0] %ECout[4:2,0,0,1] %ECout[4:2,0,0,2] %ECout[4:2,0,0,3] %ECout[4:2,0,1,0] %ECout[4:2,0,1,1] %ECout[4:2,0,1,2] %ECout[4:2,0,1,3] %ECout[4:2,0,2,0] %ECout[4:2,0,2,1] %ECout[4:2,0,2,2] %ECout[4:2,0,2,3] %ECout[4:2,1,0,0] %ECout[4:2,1,0,1] %ECout[4:2,1,0,2] %ECout[4:2,1,0,3] %ECout[4:2,1,1,0] %ECout[4:2,1,1,1] %ECout[4:2,1,1,2] %ECout[4:2,1,1,3] %ECout[4:2,1,2,0] %ECout[4:2,1,2,1] %ECout[4:2,1,2,2] %ECout[4:2,1,2,3] %ECout[4:3,0,0,0] %ECout[4:3,0,0,1] %ECout[4:3,0,0,2] %ECout[4:3,0,0,3] %ECout[4:3,0,1,0] %ECout[4:3,0,1,1] %ECout[4:3,0,1,2] %ECout[4:3,0,1,3] %ECout[4:3,0,2,0] %ECout[4:3,0,2,1] %ECout[4:3,0,2,2] %ECout[4:3,0,2,3] %ECout[4:3,1,0,0] %ECout[4:3,1,0,1] %ECout[4:3,1,0,2] %ECout[4:3,1,0,3] %ECout[4:3,1,1,0] %ECout[4:3,1,1,1] %ECout[4:3,1,1,2] %ECout[4:3,1,1,3] %ECout[4:3,1,2,0] %ECout[4:3,1,2,1] %ECout[4:3,1,2,2] %ECout[4:3,1,2,3] %ECout[4:4,0,0,0] %ECout[4:4,0,0,1] %ECout[4:4,0,0,2] %ECout[4:4,0,0,3] %ECout[4:4,0,1,0] %ECout[4:4,0,1,1] %ECout[4:4,0,1,2] %ECout[4:4,0,1,3] %ECout[4:4,0,2,0] %ECout[4:4,0,2,1] %ECout[4:4,0,2,2] %ECout[4:4,0,2,3] %ECout[4:4,1,0,0] %ECout[4:4,1,0,1] %ECout[4:4,1,0,2] %ECout[4:4,1,0,3] %ECout[4:4,1,1,0] %ECout[4:4,1,1,1] %ECout[4:4,1,1,2] %ECout[4:4,1,1,3] %ECout[4:4,1,2,0] %ECout[4:4,1,2,1] %ECout[4:4,1,2,2] %ECout[4:4,1,2,3] %ECout[4:5,0,0,0] %ECout[4:5,0,0,1] %ECout[4:5,0,0,2] %ECout[4:5,0,0,3] %ECout[4:5,0,1,0] %ECout[4:5,0,1,1] %ECout[4:5,0,1,2] %ECout[4:5,0,1,3] %ECout[4:5,0,2,0] %ECout[4:5,0,2,1] %ECout[4:5,0,2,2] %ECout[4:5,0,2,3] %ECout[4:5,1,0,0] %ECout[4:5,1,0,1] %ECout[4:5,1,0,2] %ECout[4:5,1,0,3] %ECout[4:5,1,1,0] %ECout[4:5,1,1,1] %ECout[4:5,1,1,2] %ECout[4:5,1,1,3] %ECout[4:5,1,2,0] %ECout[4:5,1,2,1] %ECout[4:5,1,2,2] %ECout[4:5,1,2,3] +_D: lure_0 0 0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 1 0 0 0 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 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 1 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 1 0 0 0 1 0 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/test_patterns_0.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/test_patterns_0.tsv new file mode 100644 index 0000000..23211cc --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/test_patterns_0.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %ECout[2:4,1] %ECout[2:4,2] %ECout[2:4,3] %ECout[2:4,4] %ECout[2:4,5] %ECout[2:4,6] %ECout[2:4,7] +_D: P1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +_D: P2 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 +_D: P3 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 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 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +_D: P17 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 +_D: P18 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +_D: P19 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 +_D: P20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/test_patterns_20.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/test_patterns_20.tsv new file mode 100644 index 0000000..c3f8b3a --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/test_patterns_20.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %ECout[2:4,1] %ECout[2:4,2] %ECout[2:4,3] %ECout[2:4,4] %ECout[2:4,5] %ECout[2:4,6] %ECout[2:4,7] +_D: P1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +_D: P2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 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1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/test_patterns_40.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/test_patterns_40.tsv new file mode 100644 index 0000000..31d5810 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/test_patterns_40.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %ECout[2:4,1] %ECout[2:4,2] %ECout[2:4,3] %ECout[2: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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 +_D: P20 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/test_patterns_50.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/test_patterns_50.tsv new file mode 100644 index 0000000..2003e3d --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/test_patterns_50.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2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 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 +_D: P18 0 0 0 1 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +_D: P19 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 +_D: P20 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/test_patterns_60.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/test_patterns_60.tsv new file mode 100644 index 0000000..3919bda --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/test_patterns_60.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %ECout[2:4,1] %ECout[2:4,2] %ECout[2:4,3] %ECout[2:4,4] %ECout[2:4,5] %ECout[2:4,6] %ECout[2:4,7] +_D: P1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 +_D: P2 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 +_D: P3 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0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_D: P16 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +_D: P17 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 +_D: P18 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 +_D: P19 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +_D: P20 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/test_patterns_80.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/test_patterns_80.tsv new file mode 100644 index 0000000..a62b913 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/test_patterns_80.tsv @@ -0,0 +1,21 @@ +_H: $Name %Input[2:0,0]<2:5,8> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Input[2:0,6] %Input[2:0,7] %Input[2:1,0] %Input[2:1,1] %Input[2:1,2] %Input[2:1,3] %Input[2:1,4] %Input[2:1,5] %Input[2:1,6] %Input[2:1,7] %Input[2:2,0] %Input[2:2,1] %Input[2:2,2] %Input[2:2,3] %Input[2:2,4] %Input[2:2,5] %Input[2:2,6] %Input[2:2,7] %Input[2:3,0] %Input[2:3,1] %Input[2:3,2] %Input[2:3,3] %Input[2:3,4] %Input[2:3,5] %Input[2:3,6] %Input[2:3,7] %Input[2:4,0] %Input[2:4,1] %Input[2:4,2] %Input[2:4,3] %Input[2:4,4] %Input[2:4,5] %Input[2:4,6] %Input[2:4,7] %ECout[2:0,0]<2:5,8> %ECout[2:0,1] %ECout[2:0,2] %ECout[2:0,3] %ECout[2:0,4] %ECout[2:0,5] %ECout[2:0,6] %ECout[2:0,7] %ECout[2:1,0] %ECout[2:1,1] %ECout[2:1,2] %ECout[2:1,3] %ECout[2:1,4] %ECout[2:1,5] %ECout[2:1,6] %ECout[2:1,7] %ECout[2:2,0] %ECout[2:2,1] %ECout[2:2,2] %ECout[2:2,3] %ECout[2:2,4] %ECout[2:2,5] %ECout[2:2,6] %ECout[2:2,7] %ECout[2:3,0] %ECout[2:3,1] %ECout[2:3,2] %ECout[2:3,3] %ECout[2:3,4] %ECout[2:3,5] %ECout[2:3,6] %ECout[2:3,7] %ECout[2:4,0] %ECout[2:4,1] %ECout[2:4,2] %ECout[2:4,3] %ECout[2:4,4] %ECout[2:4,5] %ECout[2:4,6] %ECout[2:4,7] +_D: P1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 +_D: P2 0 0 0 1 1 0 0 0 0 0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 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/train_ab.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/train_ab.tsv new file mode 100644 index 0000000..5bd29c7 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/train_ab.tsv @@ -0,0 +1,11 @@ +_H: $Name %Input[4:0,0,0,0]<4:6,2,3,4> %Input[4:0,0,0,1] %Input[4:0,0,0,2] %Input[4:0,0,0,3] %Input[4:0,0,1,0] %Input[4:0,0,1,1] %Input[4:0,0,1,2] %Input[4:0,0,1,3] %Input[4:0,0,2,0] %Input[4:0,0,2,1] %Input[4:0,0,2,2] %Input[4:0,0,2,3] %Input[4:0,1,0,0] %Input[4:0,1,0,1] %Input[4:0,1,0,2] %Input[4:0,1,0,3] %Input[4:0,1,1,0] %Input[4:0,1,1,1] %Input[4:0,1,1,2] %Input[4:0,1,1,3] %Input[4:0,1,2,0] %Input[4:0,1,2,1] %Input[4:0,1,2,2] %Input[4:0,1,2,3] %Input[4:1,0,0,0] %Input[4:1,0,0,1] %Input[4:1,0,0,2] %Input[4:1,0,0,3] %Input[4:1,0,1,0] %Input[4:1,0,1,1] %Input[4:1,0,1,2] %Input[4:1,0,1,3] %Input[4:1,0,2,0] %Input[4:1,0,2,1] %Input[4:1,0,2,2] %Input[4:1,0,2,3] %Input[4:1,1,0,0] %Input[4:1,1,0,1] %Input[4:1,1,0,2] %Input[4:1,1,0,3] %Input[4:1,1,1,0] %Input[4:1,1,1,1] %Input[4:1,1,1,2] %Input[4:1,1,1,3] %Input[4:1,1,2,0] %Input[4:1,1,2,1] %Input[4:1,1,2,2] %Input[4:1,1,2,3] %Input[4:2,0,0,0] %Input[4:2,0,0,1] %Input[4:2,0,0,2] %Input[4:2,0,0,3] %Input[4:2,0,1,0] %Input[4:2,0,1,1] %Input[4:2,0,1,2] %Input[4:2,0,1,3] %Input[4:2,0,2,0] %Input[4:2,0,2,1] %Input[4:2,0,2,2] %Input[4:2,0,2,3] %Input[4:2,1,0,0] %Input[4:2,1,0,1] %Input[4:2,1,0,2] %Input[4:2,1,0,3] %Input[4:2,1,1,0] %Input[4:2,1,1,1] %Input[4:2,1,1,2] %Input[4:2,1,1,3] %Input[4:2,1,2,0] %Input[4:2,1,2,1] %Input[4:2,1,2,2] %Input[4:2,1,2,3] %Input[4:3,0,0,0] %Input[4:3,0,0,1] %Input[4:3,0,0,2] %Input[4:3,0,0,3] %Input[4:3,0,1,0] %Input[4:3,0,1,1] %Input[4:3,0,1,2] %Input[4:3,0,1,3] %Input[4:3,0,2,0] %Input[4:3,0,2,1] %Input[4:3,0,2,2] %Input[4:3,0,2,3] %Input[4:3,1,0,0] %Input[4:3,1,0,1] %Input[4:3,1,0,2] %Input[4:3,1,0,3] %Input[4:3,1,1,0] %Input[4:3,1,1,1] %Input[4:3,1,1,2] %Input[4:3,1,1,3] %Input[4:3,1,2,0] %Input[4:3,1,2,1] %Input[4:3,1,2,2] %Input[4:3,1,2,3] %Input[4:4,0,0,0] %Input[4:4,0,0,1] %Input[4:4,0,0,2] %Input[4:4,0,0,3] %Input[4:4,0,1,0] %Input[4:4,0,1,1] %Input[4:4,0,1,2] %Input[4:4,0,1,3] %Input[4:4,0,2,0] %Input[4:4,0,2,1] %Input[4:4,0,2,2] %Input[4:4,0,2,3] %Input[4:4,1,0,0] %Input[4:4,1,0,1] %Input[4:4,1,0,2] %Input[4:4,1,0,3] %Input[4:4,1,1,0] %Input[4:4,1,1,1] %Input[4:4,1,1,2] %Input[4:4,1,1,3] %Input[4:4,1,2,0] %Input[4:4,1,2,1] %Input[4:4,1,2,2] %Input[4:4,1,2,3] %Input[4:5,0,0,0] %Input[4:5,0,0,1] %Input[4:5,0,0,2] %Input[4:5,0,0,3] %Input[4:5,0,1,0] %Input[4:5,0,1,1] %Input[4:5,0,1,2] %Input[4:5,0,1,3] %Input[4:5,0,2,0] %Input[4:5,0,2,1] %Input[4:5,0,2,2] %Input[4:5,0,2,3] %Input[4:5,1,0,0] %Input[4:5,1,0,1] %Input[4:5,1,0,2] %Input[4:5,1,0,3] %Input[4:5,1,1,0] %Input[4:5,1,1,1] %Input[4:5,1,1,2] %Input[4:5,1,1,3] %Input[4:5,1,2,0] %Input[4:5,1,2,1] %Input[4:5,1,2,2] %Input[4:5,1,2,3] %ECout[4:0,0,0,0]<4:6,2,3,4> %ECout[4:0,0,0,1] %ECout[4:0,0,0,2] %ECout[4:0,0,0,3] %ECout[4:0,0,1,0] %ECout[4:0,0,1,1] %ECout[4:0,0,1,2] %ECout[4:0,0,1,3] %ECout[4:0,0,2,0] %ECout[4:0,0,2,1] %ECout[4:0,0,2,2] %ECout[4:0,0,2,3] %ECout[4:0,1,0,0] %ECout[4:0,1,0,1] %ECout[4:0,1,0,2] %ECout[4:0,1,0,3] %ECout[4:0,1,1,0] %ECout[4:0,1,1,1] %ECout[4:0,1,1,2] %ECout[4:0,1,1,3] %ECout[4:0,1,2,0] %ECout[4:0,1,2,1] %ECout[4:0,1,2,2] %ECout[4:0,1,2,3] %ECout[4:1,0,0,0] %ECout[4:1,0,0,1] %ECout[4:1,0,0,2] %ECout[4:1,0,0,3] %ECout[4:1,0,1,0] %ECout[4:1,0,1,1] %ECout[4:1,0,1,2] %ECout[4:1,0,1,3] %ECout[4:1,0,2,0] %ECout[4:1,0,2,1] %ECout[4:1,0,2,2] %ECout[4:1,0,2,3] %ECout[4:1,1,0,0] %ECout[4:1,1,0,1] %ECout[4:1,1,0,2] %ECout[4:1,1,0,3] %ECout[4:1,1,1,0] %ECout[4:1,1,1,1] %ECout[4:1,1,1,2] %ECout[4:1,1,1,3] %ECout[4:1,1,2,0] %ECout[4:1,1,2,1] %ECout[4:1,1,2,2] %ECout[4:1,1,2,3] %ECout[4:2,0,0,0] %ECout[4:2,0,0,1] %ECout[4:2,0,0,2] %ECout[4:2,0,0,3] %ECout[4:2,0,1,0] %ECout[4:2,0,1,1] %ECout[4:2,0,1,2] %ECout[4:2,0,1,3] %ECout[4:2,0,2,0] %ECout[4:2,0,2,1] %ECout[4:2,0,2,2] %ECout[4:2,0,2,3] %ECout[4:2,1,0,0] %ECout[4:2,1,0,1] %ECout[4:2,1,0,2] %ECout[4:2,1,0,3] %ECout[4:2,1,1,0] %ECout[4:2,1,1,1] %ECout[4:2,1,1,2] %ECout[4:2,1,1,3] %ECout[4:2,1,2,0] %ECout[4:2,1,2,1] %ECout[4:2,1,2,2] %ECout[4:2,1,2,3] %ECout[4:3,0,0,0] %ECout[4:3,0,0,1] %ECout[4:3,0,0,2] %ECout[4:3,0,0,3] %ECout[4:3,0,1,0] %ECout[4:3,0,1,1] %ECout[4:3,0,1,2] %ECout[4:3,0,1,3] %ECout[4:3,0,2,0] %ECout[4:3,0,2,1] %ECout[4:3,0,2,2] %ECout[4:3,0,2,3] %ECout[4:3,1,0,0] %ECout[4:3,1,0,1] %ECout[4:3,1,0,2] %ECout[4:3,1,0,3] %ECout[4:3,1,1,0] %ECout[4:3,1,1,1] %ECout[4:3,1,1,2] %ECout[4:3,1,1,3] %ECout[4:3,1,2,0] %ECout[4:3,1,2,1] %ECout[4:3,1,2,2] %ECout[4:3,1,2,3] %ECout[4:4,0,0,0] %ECout[4:4,0,0,1] %ECout[4:4,0,0,2] %ECout[4:4,0,0,3] %ECout[4:4,0,1,0] %ECout[4:4,0,1,1] %ECout[4:4,0,1,2] %ECout[4:4,0,1,3] %ECout[4:4,0,2,0] %ECout[4:4,0,2,1] %ECout[4:4,0,2,2] %ECout[4:4,0,2,3] %ECout[4:4,1,0,0] %ECout[4:4,1,0,1] %ECout[4:4,1,0,2] %ECout[4:4,1,0,3] %ECout[4:4,1,1,0] %ECout[4:4,1,1,1] %ECout[4:4,1,1,2] %ECout[4:4,1,1,3] %ECout[4:4,1,2,0] %ECout[4:4,1,2,1] %ECout[4:4,1,2,2] %ECout[4:4,1,2,3] %ECout[4:5,0,0,0] %ECout[4:5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 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 diff --git a/ch7/hip/a/CPSY1492-Final-Project-main/train_ac.tsv b/ch7/hip/a/CPSY1492-Final-Project-main/train_ac.tsv new file mode 100644 index 0000000..33b9eb9 --- /dev/null +++ b/ch7/hip/a/CPSY1492-Final-Project-main/train_ac.tsv @@ -0,0 +1,11 @@ +_H: $Name %Input[4:0,0,0,0]<4:6,2,3,4> %Input[4:0,0,0,1] %Input[4:0,0,0,2] %Input[4:0,0,0,3] %Input[4:0,0,1,0] %Input[4:0,0,1,1] %Input[4:0,0,1,2] %Input[4:0,0,1,3] %Input[4:0,0,2,0] %Input[4:0,0,2,1] %Input[4:0,0,2,2] %Input[4:0,0,2,3] %Input[4:0,1,0,0] %Input[4:0,1,0,1] %Input[4:0,1,0,2] %Input[4:0,1,0,3] %Input[4:0,1,1,0] %Input[4:0,1,1,1] %Input[4:0,1,1,2] %Input[4:0,1,1,3] %Input[4:0,1,2,0] %Input[4:0,1,2,1] %Input[4:0,1,2,2] %Input[4:0,1,2,3] %Input[4:1,0,0,0] %Input[4:1,0,0,1] %Input[4:1,0,0,2] %Input[4:1,0,0,3] %Input[4:1,0,1,0] %Input[4:1,0,1,1] %Input[4:1,0,1,2] %Input[4:1,0,1,3] %Input[4:1,0,2,0] %Input[4:1,0,2,1] %Input[4:1,0,2,2] %Input[4:1,0,2,3] %Input[4:1,1,0,0] %Input[4:1,1,0,1] %Input[4:1,1,0,2] %Input[4:1,1,0,3] %Input[4:1,1,1,0] %Input[4:1,1,1,1] %Input[4:1,1,1,2] %Input[4:1,1,1,3] %Input[4:1,1,2,0] %Input[4:1,1,2,1] %Input[4:1,1,2,2] %Input[4:1,1,2,3] %Input[4:2,0,0,0] %Input[4:2,0,0,1] %Input[4:2,0,0,2] %Input[4:2,0,0,3] %Input[4:2,0,1,0] %Input[4:2,0,1,1] %Input[4:2,0,1,2] %Input[4:2,0,1,3] %Input[4:2,0,2,0] %Input[4:2,0,2,1] %Input[4:2,0,2,2] %Input[4:2,0,2,3] %Input[4:2,1,0,0] %Input[4:2,1,0,1] %Input[4:2,1,0,2] %Input[4:2,1,0,3] %Input[4:2,1,1,0] %Input[4:2,1,1,1] %Input[4:2,1,1,2] %Input[4:2,1,1,3] %Input[4:2,1,2,0] %Input[4:2,1,2,1] %Input[4:2,1,2,2] %Input[4:2,1,2,3] %Input[4:3,0,0,0] %Input[4:3,0,0,1] %Input[4:3,0,0,2] %Input[4:3,0,0,3] %Input[4:3,0,1,0] %Input[4:3,0,1,1] %Input[4:3,0,1,2] %Input[4:3,0,1,3] %Input[4:3,0,2,0] %Input[4:3,0,2,1] %Input[4:3,0,2,2] %Input[4:3,0,2,3] %Input[4:3,1,0,0] %Input[4:3,1,0,1] %Input[4:3,1,0,2] %Input[4:3,1,0,3] %Input[4:3,1,1,0] %Input[4:3,1,1,1] %Input[4:3,1,1,2] %Input[4:3,1,1,3] %Input[4:3,1,2,0] %Input[4:3,1,2,1] %Input[4:3,1,2,2] %Input[4:3,1,2,3] %Input[4:4,0,0,0] %Input[4:4,0,0,1] %Input[4:4,0,0,2] %Input[4:4,0,0,3] %Input[4:4,0,1,0] %Input[4:4,0,1,1] %Input[4:4,0,1,2] %Input[4:4,0,1,3] %Input[4:4,0,2,0] %Input[4:4,0,2,1] %Input[4:4,0,2,2] %Input[4:4,0,2,3] %Input[4:4,1,0,0] %Input[4:4,1,0,1] %Input[4:4,1,0,2] %Input[4:4,1,0,3] %Input[4:4,1,1,0] %Input[4:4,1,1,1] %Input[4:4,1,1,2] %Input[4:4,1,1,3] %Input[4:4,1,2,0] %Input[4:4,1,2,1] %Input[4:4,1,2,2] %Input[4:4,1,2,3] %Input[4:5,0,0,0] %Input[4:5,0,0,1] %Input[4:5,0,0,2] %Input[4:5,0,0,3] %Input[4:5,0,1,0] %Input[4:5,0,1,1] %Input[4:5,0,1,2] %Input[4:5,0,1,3] %Input[4:5,0,2,0] %Input[4:5,0,2,1] %Input[4:5,0,2,2] %Input[4:5,0,2,3] %Input[4:5,1,0,0] %Input[4:5,1,0,1] %Input[4:5,1,0,2] %Input[4:5,1,0,3] %Input[4:5,1,1,0] %Input[4:5,1,1,1] %Input[4:5,1,1,2] %Input[4:5,1,1,3] %Input[4:5,1,2,0] %Input[4:5,1,2,1] %Input[4:5,1,2,2] %Input[4:5,1,2,3] %ECout[4:0,0,0,0]<4:6,2,3,4> %ECout[4:0,0,0,1] %ECout[4:0,0,0,2] %ECout[4:0,0,0,3] %ECout[4:0,0,1,0] %ECout[4:0,0,1,1] %ECout[4:0,0,1,2] %ECout[4:0,0,1,3] %ECout[4:0,0,2,0] %ECout[4:0,0,2,1] %ECout[4:0,0,2,2] %ECout[4:0,0,2,3] %ECout[4:0,1,0,0] %ECout[4:0,1,0,1] %ECout[4:0,1,0,2] %ECout[4:0,1,0,3] %ECout[4:0,1,1,0] %ECout[4:0,1,1,1] %ECout[4:0,1,1,2] %ECout[4:0,1,1,3] %ECout[4:0,1,2,0] %ECout[4:0,1,2,1] %ECout[4:0,1,2,2] %ECout[4:0,1,2,3] %ECout[4:1,0,0,0] %ECout[4:1,0,0,1] %ECout[4:1,0,0,2] %ECout[4:1,0,0,3] %ECout[4:1,0,1,0] %ECout[4:1,0,1,1] %ECout[4:1,0,1,2] %ECout[4:1,0,1,3] %ECout[4:1,0,2,0] %ECout[4:1,0,2,1] %ECout[4:1,0,2,2] %ECout[4:1,0,2,3] %ECout[4:1,1,0,0] %ECout[4:1,1,0,1] %ECout[4:1,1,0,2] %ECout[4:1,1,0,3] %ECout[4:1,1,1,0] %ECout[4:1,1,1,1] %ECout[4:1,1,1,2] %ECout[4:1,1,1,3] %ECout[4:1,1,2,0] %ECout[4:1,1,2,1] %ECout[4:1,1,2,2] %ECout[4:1,1,2,3] %ECout[4:2,0,0,0] %ECout[4:2,0,0,1] %ECout[4:2,0,0,2] %ECout[4:2,0,0,3] %ECout[4:2,0,1,0] %ECout[4:2,0,1,1] %ECout[4:2,0,1,2] %ECout[4:2,0,1,3] %ECout[4:2,0,2,0] %ECout[4:2,0,2,1] %ECout[4:2,0,2,2] %ECout[4:2,0,2,3] %ECout[4:2,1,0,0] %ECout[4:2,1,0,1] %ECout[4:2,1,0,2] %ECout[4:2,1,0,3] %ECout[4:2,1,1,0] %ECout[4:2,1,1,1] %ECout[4:2,1,1,2] %ECout[4:2,1,1,3] %ECout[4:2,1,2,0] %ECout[4:2,1,2,1] %ECout[4:2,1,2,2] %ECout[4:2,1,2,3] %ECout[4:3,0,0,0] %ECout[4:3,0,0,1] %ECout[4:3,0,0,2] %ECout[4:3,0,0,3] %ECout[4:3,0,1,0] %ECout[4:3,0,1,1] %ECout[4:3,0,1,2] %ECout[4:3,0,1,3] %ECout[4:3,0,2,0] %ECout[4:3,0,2,1] %ECout[4:3,0,2,2] %ECout[4:3,0,2,3] %ECout[4:3,1,0,0] %ECout[4:3,1,0,1] %ECout[4:3,1,0,2] %ECout[4:3,1,0,3] %ECout[4:3,1,1,0] %ECout[4:3,1,1,1] %ECout[4:3,1,1,2] %ECout[4:3,1,1,3] %ECout[4:3,1,2,0] %ECout[4:3,1,2,1] %ECout[4:3,1,2,2] %ECout[4:3,1,2,3] %ECout[4:4,0,0,0] %ECout[4:4,0,0,1] %ECout[4:4,0,0,2] %ECout[4:4,0,0,3] %ECout[4:4,0,1,0] %ECout[4:4,0,1,1] %ECout[4:4,0,1,2] %ECout[4:4,0,1,3] %ECout[4:4,0,2,0] %ECout[4:4,0,2,1] %ECout[4:4,0,2,2] %ECout[4:4,0,2,3] %ECout[4:4,1,0,0] %ECout[4:4,1,0,1] %ECout[4:4,1,0,2] %ECout[4:4,1,0,3] %ECout[4:4,1,1,0] %ECout[4:4,1,1,1] %ECout[4:4,1,1,2] %ECout[4:4,1,1,3] %ECout[4:4,1,2,0] %ECout[4:4,1,2,1] %ECout[4:4,1,2,2] %ECout[4:4,1,2,3] %ECout[4:5,0,0,0] %ECout[4:5,0,0,1] %ECout[4:5,0,0,2] %ECout[4:5,0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 0 0 1 0 0 diff --git a/ch7/hip/hip.go b/ch7/hip/hip.go index b6452aa..9bae547 100644 --- a/ch7/hip/hip.go +++ b/ch7/hip/hip.go @@ -481,7 +481,7 @@ func (ss *Sim) ConfigLoops() { trn.Validate() // Apply DG lesion for AC training if the flag is set if ss.DGLesion { - ss.Net.LayerByName("DG").LesionNeurons(0.5) + ss.Net.LayerByName("DG").LesionNeurons(0.95) } } } diff --git a/midterm26/srn_2ctx/custom.tsv b/midterm26/srn_2ctx/custom.tsv new file mode 100644 index 0000000..d127829 --- /dev/null +++ b/midterm26/srn_2ctx/custom.tsv @@ -0,0 +1,11 @@ +_H: $Name %Input[2:0,0]<2:1,6> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Output[2:0,0]<2:1,6> %Output[2:0,1] %Output[2:0,2] %Output[2:0,3] %Output[2:0,4] %Output[2:0,5] +_D: A 1 0 0 0 0 0 0 1 0 0 0 0 +_D: B 0 1 0 0 0 0 0 0 1 0 0 0 +_D: C 0 0 1 0 0 0 0 1 0 0 0 0 +_D: D 0 0 0 1 0 0 0 0 1 0 0 0 +_D: E 0 0 0 0 1 0 0 1 0 0 0 0 +_D: B 0 1 0 0 0 0 0 0 1 0 0 0 +_D: C 0 0 1 0 0 0 0 1 0 0 0 0 +_D: D 0 0 0 1 0 0 0 0 0 1 0 0 +_D: F 0 0 0 0 0 1 1 0 0 0 0 0 + diff --git a/midterm26/srn_2ctx/enumgen.go b/midterm26/srn_2ctx/enumgen.go new file mode 100644 index 0000000..3f6390f --- /dev/null +++ b/midterm26/srn_2ctx/enumgen.go @@ -0,0 +1,48 @@ +// Code generated by "core generate -add-types"; DO NOT EDIT. + +package main + +import ( + "cogentcore.org/core/enums" +) + +var _PatsTypeValues = []PatsType{0, 1, 2} + +// PatsTypeN is the highest valid value for type PatsType, plus one. +const PatsTypeN PatsType = 3 + +var _PatsTypeValueMap = map[string]PatsType{`Zeroth`: 0, `First`: 1, `Third`: 2} + +var _PatsTypeDescMap = map[PatsType]string{0: `zeroth order sequence`, 1: `first order sequence`, 2: `3rd order sequence`} + +var _PatsTypeMap = map[PatsType]string{0: `Zeroth`, 1: `First`, 2: `Third`} + +// String returns the string representation of this PatsType value. +func (i PatsType) String() string { return enums.String(i, _PatsTypeMap) } + +// SetString sets the PatsType value from its string representation, +// and returns an error if the string is invalid. +func (i *PatsType) SetString(s string) error { + return enums.SetString(i, s, _PatsTypeValueMap, "PatsType") +} + +// Int64 returns the PatsType value as an int64. +func (i PatsType) Int64() int64 { return int64(i) } + +// SetInt64 sets the PatsType value from an int64. +func (i *PatsType) SetInt64(in int64) { *i = PatsType(in) } + +// Desc returns the description of the PatsType value. +func (i PatsType) Desc() string { return enums.Desc(i, _PatsTypeDescMap) } + +// PatsTypeValues returns all possible values for the type PatsType. +func PatsTypeValues() []PatsType { return _PatsTypeValues } + +// Values returns all possible values for the type PatsType. +func (i PatsType) Values() []enums.Enum { return enums.Values(_PatsTypeValues) } + +// MarshalText implements the [encoding.TextMarshaler] interface. +func (i PatsType) MarshalText() ([]byte, error) { return []byte(i.String()), nil } + +// UnmarshalText implements the [encoding.TextUnmarshaler] interface. +func (i *PatsType) UnmarshalText(text []byte) error { return enums.UnmarshalText(i, text, "PatsType") } diff --git a/midterm26/srn_2ctx/first.tsv b/midterm26/srn_2ctx/first.tsv new file mode 100644 index 0000000..69f4701 --- /dev/null +++ b/midterm26/srn_2ctx/first.tsv @@ -0,0 +1,6 @@ +_H: $Name %Input[2:0,0]<2:1,6> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Output[2:0,0]<2:1,6> %Output[2:0,1] %Output[2:0,2] %Output[2:0,3] %Output[2:0,4] %Output[2:0,5] +_D: A 1 0 0 0 0 0 0 1 0 0 0 0 +_D: BC 0 1 0 0 0 0 0 0 1 0 0 0 +_D: C 0 0 1 0 0 0 0 1 0 0 0 0 +_D: BA 0 1 0 0 0 0 1 0 0 0 0 0 +_D: A 1 0 0 0 0 0 0 1 0 0 0 0 \ No newline at end of file diff --git a/midterm26/srn_2ctx/srn_2ctx.go b/midterm26/srn_2ctx/srn_2ctx.go new file mode 100644 index 0000000..6f7391c --- /dev/null +++ b/midterm26/srn_2ctx/srn_2ctx.go @@ -0,0 +1,731 @@ +// Copyright (c) 2024, The Emergent Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Simple Recurrent Network (SRN) with Two Context Layers +// CLPS1492 Computational Cognitive Neuroscience -- Midterm +// Please see the associated README.md file for a description of this project. +// +// This file is a completed version of srn.go with: +// - Hidden and context layers added as per the SRN instructions +// - A second context layer (Context2) that projects to the hidden layer +// just like the first one, but with separate FmPrv2 and FmHid2 parameters +// that can be controlled independently from the first context layer + +package main + +//go:generate core generate -add-types + +import ( + "embed" + // Uncomment the below line to import "fmt" that supports printing in Go. This will prove useful for debugging. + //"fmt" + + "cogentcore.org/core/base/errors" + "cogentcore.org/lab/base/randx" + "cogentcore.org/core/core" + "cogentcore.org/core/enums" + "cogentcore.org/core/icons" + "cogentcore.org/core/math32" + "github.com/emer/etensor/tensor/stats/clust" + "github.com/emer/etensor/tensor/table" + "cogentcore.org/core/tree" + "github.com/emer/emergent/v2/econfig" + "github.com/emer/emergent/v2/egui" + "github.com/emer/emergent/v2/elog" + "github.com/emer/emergent/v2/emer" + "github.com/emer/emergent/v2/env" + "github.com/emer/emergent/v2/estats" + "github.com/emer/emergent/v2/etime" + "github.com/emer/emergent/v2/looper" + "github.com/emer/emergent/v2/netview" + "github.com/emer/emergent/v2/params" + "github.com/emer/emergent/v2/paths" + "github.com/emer/leabra/v2/leabra" +) + +//go:embed zeroth.tsv first.tsv third.tsv +var content embed.FS + +// PatsType is the type of training patterns +type PatsType int32 //enums:enum + +const ( + // zeroth order sequence + Zeroth PatsType = iota + + // first order sequence + First + + // 3rd order sequence + Third +) + +// LearnType is the type of learning to use +//type LearnType int32 //enums:enum + +func main() { + sim := &Sim{} + sim.New() + sim.ConfigAll() + sim.RunGUI() +} + +// ParamSets is the default set of parameters. +// Base is always applied, and others can be optionally +// selected to apply on top of that. +var ParamSets = params.Sets{ + "Base": { + {Sel: "Path", Desc: "no extra learning factors", + Params: params.Params{ + "Path.Learn.Norm.On": "true", + "Path.Learn.Momentum.On": "true", + "Path.Learn.WtBal.On": "false", + "Path.WtScale.Rel": "0.3", + }}, + {Sel: "Layer", Desc: "needs some special inhibition and learning params", + Params: params.Params{ + "Layer.Learn.AvgL.Gain": "1.5", // this is critical! 2.5 def doesn't work + "Layer.Inhib.Layer.Gi": "1.3", + "Layer.Inhib.ActAvg.Init": "0.5", + "Layer.Inhib.ActAvg.Fixed": "true", + "Layer.Act.Gbar.L": "0.1", + }}, + {Sel: "#Output", Desc: "output definitely needs lower inhib -- true for smaller layers in general", + Params: params.Params{ + "Layer.Inhib.Layer.Gi": "1.4", + }}, + }, + "Hebbian": { + {Sel: "Path", Desc: "", + Params: params.Params{ + "Path.Learn.XCal.MLrn": "0", + "Path.Learn.XCal.SetLLrn": "true", + "Path.Learn.XCal.LLrn": "1", + }}, + }, + "ErrorDriven": { + {Sel: "Path", Desc: "", + Params: params.Params{ + "Path.Learn.XCal.MLrn": "1", + "Path.Learn.XCal.SetLLrn": "true", + "Path.Learn.XCal.LLrn": "0", + }}, + }, +} + +// Config has config parameters related to running the sim +type Config struct { + // total number of runs to do when running Train + NRuns int `default:"10" min:"1"` + + // total number of epochs per run + NEpochs int `default:"400"` + + // stop run after this number of perfect, zero-error epochs. + NZero int `default:"5"` + + // how often to run through all the test patterns, in terms of training epochs. + // can use 0 or -1 for no testing. + TestInterval int `default:"5"` +} + +// Sim encapsulates the entire simulation model, and we define all the +// functionality as methods on this struct. This structure keeps all relevant +// state information organized and available without having to pass everything around +// as arguments to methods, and provides the core GUI interface (note the view tags +// for the fields which provide hints to how things should be displayed). +type Sim struct { + + // select which type of patterns to use + Patterns PatsType + + // Config contains misc configuration parameters for running the sim + Config Config `new-window:"+" display:"no-inline"` + + // the network -- click to view / edit parameters for layers, paths, etc + Net *leabra.Network `new-window:"+" display:"no-inline"` + + // network parameter management + Params emer.NetParams `display:"-"` + + // zeroth order training patterns + Zeroth *table.Table `new-window:"+" display:"no-inline"` + // first order training patterns + First *table.Table `new-window:"+" display:"no-inline"` + // 3rd order training patterns + Third *table.Table `new-window:"+" display:"no-inline"` + + // contains looper control loops for running sim + Loops *looper.Stacks `new-window:"+" display:"no-inline"` + + // contains computed statistic values + Stats estats.Stats `new-window:"+"` + + // Contains all the logs and information about the logs.' + Logs elog.Logs `new-window:"+"` + + // Environments + Envs env.Envs `new-window:"+" display:"no-inline"` + + // leabra timing parameters and state + Context leabra.Context `new-window:"+"` + + // netview update parameters + ViewUpdate netview.ViewUpdate `display:"add-fields"` + + // manages all the gui elements + GUI egui.GUI `display:"-"` + + // a list of random seeds to use for each run + RandSeeds randx.Seeds `display:"-"` + + // FmHid is the proportion of the first context layer's activity taken from the hidden layer + FmHid float32 `desc:"percentage of the context layer activity that will be taken directly from the hidden layer"` + + // FmPrv is the proportion of the first context layer's previous activity retained + FmPrv float32 `desc:"percentage of the context layer activity that will be kept"` + + // FmHid2 is the proportion of the second context layer's activity taken from the hidden layer + FmHid2 float32 `desc:"percentage of the second context layer activity that will be taken directly from the hidden layer"` + + // FmPrv2 is the proportion of the second context layer's previous activity retained + FmPrv2 float32 `desc:"percentage of the second context layer activity that will be kept"` + + TmpVals1 []float32 `display:"-"` + TmpVals2 []float32 `display:"-"` +} + +// New creates new blank elements and initializes defaults +func (ss *Sim) New() { + ss.FmHid = 1 + ss.FmPrv = 0 + ss.FmHid2 = 1 + ss.FmPrv2 = 0 + + econfig.Config(&ss.Config, "config.toml") + ss.Patterns = Zeroth + ss.Net = leabra.NewNetwork("HiddenNet") + + ss.Params.Config(ParamSets, "", "", ss.Net) + ss.Stats.Init() + ss.Zeroth = &table.Table{} + ss.First = &table.Table{} + ss.Third = &table.Table{} + ss.RandSeeds.Init(100) // max 100 runs + ss.InitRandSeed(0) + ss.Context.Defaults() +} + +////////////////////////////////////////////////////////////////////////////// +// Configs + +// ConfigAll configures all the elements using the standard functions +func (ss *Sim) ConfigAll() { + ss.OpenPatterns() + ss.ConfigEnv() + ss.ConfigNet(ss.Net) + ss.ConfigLogs() + ss.ConfigLoops() +} + +func (ss *Sim) OpenPatterns() { + ss.Zeroth.SetMetaData("name", "Zeroth") + ss.Zeroth.SetMetaData("desc", "zeroth order training patterns") + errors.Log(ss.Zeroth.OpenFS(content, "zeroth.tsv", table.Tab)) + + ss.First.SetMetaData("name", "First") + ss.First.SetMetaData("desc", "first order training patterns") + errors.Log(ss.First.OpenFS(content, "first.tsv", table.Tab)) + + ss.Third.SetMetaData("name", "Third") + ss.Third.SetMetaData("desc", "third order training patterns") + errors.Log(ss.Third.OpenFS(content, "third.tsv", table.Tab)) +} + +func (ss *Sim) ConfigEnv() { + // Can be called multiple times -- don't re-create + var trn, tst *env.FixedTable + if len(ss.Envs) == 0 { + trn = &env.FixedTable{} + tst = &env.FixedTable{} + } else { + trn = ss.Envs.ByMode(etime.Train).(*env.FixedTable) + tst = ss.Envs.ByMode(etime.Test).(*env.FixedTable) + } + + // note: names must be standard here! + trn.Name = etime.Train.String() + trn.Config(table.NewIndexView(ss.Zeroth)) + trn.Sequential = true + trn.Validate() + + tst.Name = etime.Test.String() + tst.Config(table.NewIndexView(ss.Zeroth)) + tst.Sequential = true + tst.Validate() + + trn.Init(0) + tst.Init(0) + + // note: names must be in place when adding + ss.Envs.Add(trn, tst) +} + +func (ss *Sim) ConfigNet(net *leabra.Network) { + net.SetRandSeed(ss.RandSeeds[0]) // init new separate random seed, using run = 0 + + inp := net.AddLayer2D("Input", 1, 6, leabra.InputLayer) + hid := net.AddLayer2D("Hidden", 6, 5, leabra.SuperLayer) + out := net.AddLayer2D("Output", 1, 6, leabra.TargetLayer) + + // Context receives a copy of the hidden layer's previous activations. + // It projects to the hidden layer, providing recurrent context (Elman SRN). + // FmHid and FmPrv control blending between new hidden state and prior context state. + context := net.AddLayer2D("Context", 6, 5, leabra.InputLayer) + + // Context2 is a second context layer identical to Context but with independently + // controllable FmHid2 and FmPrv2 parameters. + context2 := net.AddLayer2D("Context2", 6, 5, leabra.InputLayer) + + full := paths.NewFull() + + net.ConnectLayers(inp, hid, full, leabra.ForwardPath) + net.BidirConnectLayers(hid, out, full) + net.ConnectLayers(context, hid, full, leabra.ForwardPath) + net.ConnectLayers(context2, hid, full, leabra.ForwardPath) + + out.PlaceAbove(hid) + context.PlaceRightOf(inp, 2) + context2.PlaceRightOf(context, 2) + + net.Build() + net.Defaults() + ss.ApplyParams() + net.InitWeights() +} + +func (ss *Sim) ApplyParams() { + ss.Params.SetAll() + ss.Params.SetAllSheet("ErrorDriven") + if ss.Loops != nil { + trn := ss.Loops.Stacks[etime.Train] + trn.Loops[etime.Run].Counter.Max = ss.Config.NRuns + trn.Loops[etime.Epoch].Counter.Max = ss.Config.NEpochs + } +} + +//////////////////////////////////////////////////////////////////////////////// +// Init, utils + +// Init restarts the run, and initializes everything, including network weights +// and resets the epoch log table +func (ss *Sim) Init() { + ss.Stats.SetString("RunName", ss.Params.RunName(0)) // in case user interactively changes tag + ss.Loops.ResetCounters() + ss.InitRandSeed(0) + ss.ConfigEnv() // re-config env just in case a different set of patterns was + ss.GUI.StopNow = false + ss.ApplyParams() + ss.NewRun() + ss.ViewUpdate.RecordSyns() + ss.ViewUpdate.Update() +} + +// InitRandSeed initializes the random seed based on current training run number +func (ss *Sim) InitRandSeed(run int) { + ss.RandSeeds.Set(run) + ss.RandSeeds.Set(run, &ss.Net.Rand) +} + +// ConfigLoops configures the control loops: Training, Testing +func (ss *Sim) ConfigLoops() { + ls := looper.NewStacks() + + trls := 10 + + ls.AddStack(etime.Train). + AddTime(etime.Run, ss.Config.NRuns). + AddTime(etime.Epoch, ss.Config.NEpochs). + AddTime(etime.Trial, trls). + AddTime(etime.Cycle, 100) + + ls.AddStack(etime.Test). + AddTime(etime.Epoch, 1). + AddTime(etime.Trial, trls). + AddTime(etime.Cycle, 100) + + leabra.LooperStdPhases(ls, &ss.Context, ss.Net, 75, 99) // plus phase timing + leabra.LooperSimCycleAndLearn(ls, ss.Net, &ss.Context, &ss.ViewUpdate) // std algo code + + for m, _ := range ls.Stacks { + mode := m // For closures + stack := ls.Stacks[mode] + stack.Loops[etime.Trial].OnStart.Add("ApplyInputs", func() { + ss.ApplyInputs() + }) + } + + ls.Loop(etime.Train, etime.Run).OnStart.Add("NewRun", ss.NewRun) + + // Train stop early condition + ls.Loop(etime.Train, etime.Epoch).IsDone.AddBool("NZeroStop", func() bool { + // This is calculated in TrialStats + stopNz := ss.Config.NZero + if stopNz <= 0 { + stopNz = 2 + } + curNZero := ss.Stats.Int("NZero") + stop := curNZero >= stopNz + return stop + }) + + // Add Testing + trainEpoch := ls.Loop(etime.Train, etime.Epoch) + trainEpoch.OnStart.Add("TestAtInterval", func() { + if (ss.Config.TestInterval > 0) && ((trainEpoch.Counter.Cur+1)%ss.Config.TestInterval == 0) { + // Note the +1 so that it doesn't occur at the 0th timestep. + ss.TestAll() + } + }) + + ///////////////////////////////////////////// + // Logging + + ls.Loop(etime.Test, etime.Epoch).OnEnd.Add("LogTestErrors", func() { + leabra.LogTestErrors(&ss.Logs) + }) + ls.AddOnEndToAll("Log", func(mode enums.Enum, time enums.Enum) { + ss.Log(mode.(etime.Modes), time.(etime.Times)) + }) + leabra.LooperResetLogBelow(ls, &ss.Logs) + ls.Loop(etime.Train, etime.Run).OnEnd.Add("RunStats", func() { + ss.Logs.RunStats("PctCor", "FirstZero", "LastZero") + }) + + //////////////////////////////////////////// + // GUI + + leabra.LooperUpdateNetView(ls, &ss.ViewUpdate, ss.Net, ss.NetViewCounters) + leabra.LooperUpdatePlots(ls, &ss.GUI) + + ss.Loops = ls +} + +// ApplyInputs applies input patterns from given environment. +// It is good practice to have this be a separate method with appropriate +// args so that it can be used for various different contexts +// (training, testing, etc). +func (ss *Sim) ApplyInputs() { + + ctx := &ss.Context + net := ss.Net + // net.InitActs() is commented out so that activations carry over between trials, + // which is required for the context layer mechanism to work correctly. + // net.InitActs() + + ev := ss.Envs.ByMode(ctx.Mode).(*env.FixedTable) + ev.Step() + + net.InitExt() + + lays := net.LayersByType(leabra.InputLayer, leabra.TargetLayer) + + ss.Stats.SetString("TrialName", ev.TrialName.Cur) + for _, lnm := range lays { + // Skip the context layers: they are InputLayer type but are not part of the + // training table and are updated manually from the hidden layer below. + if lnm == "Context" || lnm == "Context2" { + continue + } + ly := ss.Net.LayerByName(lnm) + pats := ev.State(ly.Name) + if pats != nil { + ly.ApplyExt(pats) + } + } + + out := ss.Net.LayerByName("Output") + if ctx.Mode == etime.Test { + out.Type = leabra.CompareLayer // don't clamp plus phase + } else { + out.Type = leabra.TargetLayer + } + + // Update the two context layers from the hidden layer's previous plus-phase activity. + // Each context layer uses its own FmHid/FmPrv parameters so they can be tuned independently. + hid := net.LayerByName("Hidden") + hid.UnitValues(&ss.TmpVals1, "ActP", 0) + + // Context layer 1: controlled by FmHid and FmPrv + ctxLay := net.LayerByName("Context") + clr, set, toTarg := ctxLay.ApplyExtFlags() + for i := range ctxLay.Neurons { + ext := ss.FmHid*ss.TmpVals1[i] + ss.FmPrv*ctxLay.Neurons[i].ActP + ctxLay.ApplyExtValue(i, ext, clr, set, toTarg) + } + + // Context layer 2: controlled by FmHid2 and FmPrv2 (independent from Context layer 1) + ctx2Lay := net.LayerByName("Context2") + clr2, set2, toTarg2 := ctx2Lay.ApplyExtFlags() + for i := range ctx2Lay.Neurons { + ext := ss.FmHid2*ss.TmpVals1[i] + ss.FmPrv2*ctx2Lay.Neurons[i].ActP + ctx2Lay.ApplyExtValue(i, ext, clr2, set2, toTarg2) + } +} + +func (ss *Sim) UpdateEnv() { + trn := ss.Envs.ByMode(etime.Train).(*env.FixedTable) + tst := ss.Envs.ByMode(etime.Test).(*env.FixedTable) + switch ss.Patterns { + case Zeroth: + trn.Table = table.NewIndexView(ss.Zeroth) + tst.Table = table.NewIndexView(ss.Zeroth) + case First: + trn.Table = table.NewIndexView(ss.First) + tst.Table = table.NewIndexView(ss.First) + case Third: + trn.Table = table.NewIndexView(ss.Third) + tst.Table = table.NewIndexView(ss.Third) + } +} + +// NewRun intializes a new run of the model, using the TrainEnv.Run counter +// for the new run value +func (ss *Sim) NewRun() { + ctx := &ss.Context + ss.InitRandSeed(ss.Loops.Loop(etime.Train, etime.Run).Counter.Cur) + ss.UpdateEnv() + ss.Envs.ByMode(etime.Train).Init(0) + ss.Envs.ByMode(etime.Test).Init(0) + ctx.Reset() + ctx.Mode = etime.Train + ss.Net.InitWeights() + ss.InitStats() + ss.StatCounters() + ss.Logs.ResetLog(etime.Train, etime.Epoch) + ss.Logs.ResetLog(etime.Test, etime.Epoch) + ss.ApplyParams() +} + +// TestAll runs through the full set of testing items +func (ss *Sim) TestAll() { + ss.Envs.ByMode(etime.Test).Init(0) + ss.Loops.ResetAndRun(etime.Test) + ss.Loops.Mode = etime.Train // Important to reset Mode back to Train because this is called from within the Train Run. +} + +///////////////////////////////////////////////////////////////////// +// Stats + +// InitStats initializes all the statistics. +// called at start of new run +func (ss *Sim) InitStats() { + ss.Stats.SetFloat("SSE", 0.0) + ss.Stats.SetString("TrialName", "") + ss.Logs.InitErrStats() // inits TrlErr, FirstZero, LastZero, NZero +} + +// StatCounters saves current counters to Stats, so they are available for logging etc +// Also saves a string rep of them for ViewUpdate.Text +func (ss *Sim) StatCounters() { + ctx := &ss.Context + mode := ctx.Mode + ss.Loops.Stacks[mode].CountersToStats(&ss.Stats) + // always use training epoch.. + trnEpc := ss.Loops.Stacks[etime.Train].Loops[etime.Epoch].Counter.Cur + ss.Stats.SetInt("Epoch", trnEpc) + trl := ss.Stats.Int("Trial") + ss.Stats.SetInt("Trial", trl) + ss.Stats.SetInt("Cycle", int(ctx.Cycle)) +} + +func (ss *Sim) NetViewCounters(tm etime.Times) { + if ss.ViewUpdate.View == nil { + return + } + if tm == etime.Trial { + ss.TrialStats() // get trial stats for current di + } + ss.StatCounters() + ss.ViewUpdate.Text = ss.Stats.Print([]string{"Run", "Epoch", "Trial", "TrialName", "Cycle", "SSE", "TrlErr"}) +} + +// TrialStats computes the trial-level statistics. +// Aggregation is done directly from log data. +func (ss *Sim) TrialStats() { + out := ss.Net.LayerByName("Output") + + sse, avgsse := out.MSE(0.5) // 0.5 = per-unit tolerance -- right side of .5 + ss.Stats.SetFloat("SSE", sse) + ss.Stats.SetFloat("AvgSSE", avgsse) + if sse > 0 { + ss.Stats.SetFloat("TrlErr", 1) + } else { + ss.Stats.SetFloat("TrlErr", 0) + } +} + +////////////////////////////////////////////////////////////////////////////// +// Logging + +func (ss *Sim) ConfigLogs() { + ss.Stats.SetString("RunName", ss.Params.RunName(0)) // used for naming logs, stats, etc + + ss.Logs.AddCounterItems(etime.Run, etime.Epoch, etime.Trial, etime.Cycle) + ss.Logs.AddStatStringItem(etime.AllModes, etime.AllTimes, "RunName") + ss.Logs.AddStatStringItem(etime.AllModes, etime.Trial, "TrialName") + + ss.Logs.AddStatAggItem("SSE", etime.Run, etime.Epoch, etime.Trial) + ss.Logs.AddStatAggItem("AvgSSE", etime.Run, etime.Epoch, etime.Trial) + ss.Logs.AddErrStatAggItems("TrlErr", etime.Run, etime.Epoch, etime.Trial) + + ss.Logs.AddCopyFromFloatItems(etime.Train, []etime.Times{etime.Epoch, etime.Run}, etime.Test, etime.Epoch, "Tst", "SSE", "AvgSSE") + + ss.Logs.AddPerTrlMSec("PerTrlMSec", etime.Run, etime.Epoch, etime.Trial) + + ss.Logs.AddLayerTensorItems(ss.Net, "ActM", etime.Test, etime.Trial, "InputLayer", "SuperLayer", "TargetLayer") + ss.Logs.AddLayerTensorItems(ss.Net, "Targ", etime.Test, etime.Trial, "TargetLayer") + + ss.Logs.PlotItems("SSE", "FirstZero", "LastZero") + + ss.Logs.CreateTables() + ss.Logs.SetContext(&ss.Stats, ss.Net) + // don't plot certain combinations we don't use + ss.Logs.NoPlot(etime.Train, etime.Cycle) + ss.Logs.NoPlot(etime.Test, etime.Cycle) + ss.Logs.NoPlot(etime.Test, etime.Trial) + ss.Logs.NoPlot(etime.Test, etime.Run) + ss.Logs.SetMeta(etime.Train, etime.Run, "LegendCol", "RunName") +} + +// Log is the main logging function, handles special things for different scopes +func (ss *Sim) Log(mode etime.Modes, time etime.Times) { + ctx := &ss.Context + if mode != etime.Analyze { + ctx.Mode = mode // Also set specifically in a Loop callback. + } + dt := ss.Logs.Table(mode, time) + if dt == nil { + return + } + row := dt.Rows + + switch { + case time == etime.Cycle: + return + case time == etime.Trial: + ss.TrialStats() + ss.StatCounters() + } + + ss.Logs.LogRow(mode, time, row) // also logs to file, etc + + if mode == etime.Test { + ss.GUI.UpdateTableView(etime.Test, etime.Trial) + } +} + +////////////////////////////////////////////////////////////////////// +// Reps Analysis + +// RepsAnalysis analyzes the representations in the Hidden layer as +// captured in the Test Trial log, and produces a cluster plot. +func (ss *Sim) RepsAnalysis() { + trl := ss.Logs.Table(etime.Test, etime.Trial) + if trl == nil { + return + } + ix := table.NewIndexView(trl) + ix.SortColumnName("TrialName", table.Ascending) + estats.ClusterPlot(ss.GUI.PlotByName("HiddenClust"), ix, "Hidden_ActM", "TrialName", clust.ContrastDist) + ss.GUI.PlotByName("HiddenClust").GoUpdatePlot() +} + +////////////////////////////////////////////////////////////////////// +// GUI + +// ConfigGUI configures the Cogent Core GUI interface for this simulation. +func (ss *Sim) ConfigGUI() { + title := "Simple Recurrent Network (Two Context Layers)" + ss.GUI.MakeBody(ss, "SRN_2ctx", title, `SRN midterm -- two context layers`) + ss.GUI.CycleUpdateInterval = 10 + + nv := ss.GUI.AddNetView("Network") + nv.Options.MaxRecs = 300 + nv.SetNet(ss.Net) + nv.Options.PathWidth = 0.005 + ss.ViewUpdate.Config(nv, etime.GammaCycle, etime.GammaCycle) + ss.GUI.ViewUpdate = &ss.ViewUpdate + nv.Current() + + nv.SceneXYZ().Camera.Pose.Pos.Set(0.1, 1.5, 4) // more "head on" than default which is more "top down" + nv.SceneXYZ().Camera.LookAt(math32.Vec3(0.1, 0.1, 0), math32.Vec3(0, 1, 0)) + + ss.GUI.AddPlots(title, &ss.Logs) + + ss.GUI.AddTableView(&ss.Logs, etime.Test, etime.Trial) + + ss.GUI.AddMiscPlotTab("HiddenClust") + + ss.GUI.FinalizeGUI(false) +} + +func (ss *Sim) MakeToolbar(p *tree.Plan) { + ss.GUI.AddLooperCtrl(p, ss.Loops) + + ss.GUI.AddToolbarItem(p, egui.ToolbarItem{Label: "Test Init", Icon: icons.Update, + Tooltip: "Initialize testing to start over -- if Test Step doesn't work, then do this.", + Active: egui.ActiveStopped, + Func: func() { + ss.Loops.ResetCountersByMode(etime.Test) + }, + }) + + //////////////////////////////////////////////// + tree.Add(p, func(w *core.Separator) {}) + ss.GUI.AddToolbarItem(p, egui.ToolbarItem{Label: "Reps Analysis", + Icon: icons.Image, + Tooltip: "Run cluster plot analysis of Hidden layer representations from the test trial log.", + Active: egui.ActiveAlways, + Func: func() { + ss.RepsAnalysis() + }, + }) + + //////////////////////////////////////////////// + tree.Add(p, func(w *core.Separator) {}) + ss.GUI.AddToolbarItem(p, egui.ToolbarItem{Label: "Reset RunLog", + Icon: icons.Reset, + Tooltip: "Reset the accumulated log of all Runs, which are tagged with the ParamSet used", + Active: egui.ActiveAlways, + Func: func() { + ss.Logs.ResetLog(etime.Train, etime.Run) + ss.GUI.UpdatePlot(etime.Train, etime.Run) + }, + }) + //////////////////////////////////////////////// + tree.Add(p, func(w *core.Separator) {}) + ss.GUI.AddToolbarItem(p, egui.ToolbarItem{Label: "New Seed", + Icon: icons.Add, + Tooltip: "Generate a new initial random seed to get different results. By default, Init re-establishes the same initial seed every time.", + Active: egui.ActiveAlways, + Func: func() { + ss.RandSeeds.NewSeeds() + }, + }) + ss.GUI.AddToolbarItem(p, egui.ToolbarItem{Label: "README", + Icon: icons.FileMarkdown, + Tooltip: "Opens your browser on the README file that contains instructions for how to run this model.", + Active: egui.ActiveAlways, + Func: func() { + core.TheApp.OpenURL("https://canvas.brown.edu/") + }, + }) +} + +func (ss *Sim) RunGUI() { + ss.Init() + ss.ConfigGUI() + ss.GUI.Body.RunMainWindow() +} diff --git a/midterm26/srn_2ctx/third.tsv b/midterm26/srn_2ctx/third.tsv new file mode 100644 index 0000000..eec3072 --- /dev/null +++ b/midterm26/srn_2ctx/third.tsv @@ -0,0 +1,11 @@ +_H: $Name %Input[2:0,0]<2:1,6> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Output[2:0,0]<2:1,6> %Output[2:0,1] %Output[2:0,2] %Output[2:0,3] %Output[2:0,4] %Output[2:0,5] +_D: A 1 0 0 0 0 0 0 1 0 0 0 0 +_D: B 0 1 0 0 0 0 0 0 1 0 0 0 +_D: C 0 0 1 0 0 0 0 0 0 1 0 0 +_D: DE 0 0 0 1 0 0 0 0 0 0 1 0 +_D: E 0 0 0 0 1 0 0 1 0 0 0 0 +_D: B 0 1 0 0 0 0 0 0 1 0 0 0 +_D: C 0 0 1 0 0 0 0 0 0 1 0 0 +_D: DF 0 0 0 1 0 0 0 0 0 0 0 1 +_D: F 0 0 0 0 0 1 1 0 0 0 0 0 + diff --git a/midterm26/srn_2ctx/typegen.go b/midterm26/srn_2ctx/typegen.go new file mode 100644 index 0000000..57e498d --- /dev/null +++ b/midterm26/srn_2ctx/typegen.go @@ -0,0 +1,13 @@ +// Code generated by "core generate -add-types"; DO NOT EDIT. + +package main + +import ( + "cogentcore.org/core/types" +) + +var _ = types.AddType(&types.Type{Name: "main.PatsType", IDName: "pats-type", Doc: "PatsType is the type of training patterns"}) + +var _ = types.AddType(&types.Type{Name: "main.Config", IDName: "config", Doc: "Config has config parameters related to running the sim", Fields: []types.Field{{Name: "NRuns", Doc: "total number of runs to do when running Train"}, {Name: "NEpochs", Doc: "total number of epochs per run"}, {Name: "NZero", Doc: "stop run after this number of perfect, zero-error epochs."}, {Name: "TestInterval", Doc: "how often to run through all the test patterns, in terms of training epochs.\ncan use 0 or -1 for no testing."}}}) + +var _ = types.AddType(&types.Type{Name: "main.Sim", IDName: "sim", Doc: "Sim encapsulates the entire simulation model, and we define all the\nfunctionality as methods on this struct. This structure keeps all relevant\nstate information organized and available without having to pass everything around\nas arguments to methods, and provides the core GUI interface (note the view tags\nfor the fields which provide hints to how things should be displayed).", Fields: []types.Field{{Name: "Patterns", Doc: "select which type of patterns to use"}, {Name: "Config", Doc: "Config contains misc configuration parameters for running the sim"}, {Name: "Net", Doc: "the network -- click to view / edit parameters for layers, paths, etc"}, {Name: "Params", Doc: "network parameter management"}, {Name: "Zeroth", Doc: "zeroth order training patterns"}, {Name: "First", Doc: "first order training patterns"}, {Name: "Third", Doc: "3rd order training patterns"}, {Name: "Loops", Doc: "contains looper control loops for running sim"}, {Name: "Stats", Doc: "contains computed statistic values"}, {Name: "Logs", Doc: "Contains all the logs and information about the logs.'"}, {Name: "Envs", Doc: "Environments"}, {Name: "Context", Doc: "leabra timing parameters and state"}, {Name: "ViewUpdate", Doc: "netview update parameters"}, {Name: "GUI", Doc: "manages all the gui elements"}, {Name: "RandSeeds", Doc: "a list of random seeds to use for each run"}, {Name: "FmHid", Doc: "FmHid is the proportion of the first context layer's activity taken from the hidden layer"}, {Name: "FmPrv", Doc: "FmPrv is the proportion of the first context layer's previous activity retained"}, {Name: "FmHid2", Doc: "FmHid2 is the proportion of the second context layer's activity taken from the hidden layer"}, {Name: "FmPrv2", Doc: "FmPrv2 is the proportion of the second context layer's previous activity retained"}, {Name: "TmpVals1"}, {Name: "TmpVals2"}}}) diff --git a/midterm26/srn_2ctx/zeroth.tsv b/midterm26/srn_2ctx/zeroth.tsv new file mode 100644 index 0000000..ecc819d --- /dev/null +++ b/midterm26/srn_2ctx/zeroth.tsv @@ -0,0 +1,4 @@ +_H: $Name %Input[2:0,0]<2:1,6> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Output[2:0,0]<2:1,6> %Output[2:0,1] %Output[2:0,2] %Output[2:0,3] %Output[2:0,4] %Output[2:0,5] +_D: A 1 0 0 0 0 0 0 1 0 0 0 0 +_D: B 0 1 0 0 0 0 0 0 1 0 0 0 +_D: C 0 0 1 0 0 0 0 0 0 1 0 0 diff --git a/midterm26/ssm/enumgen.go b/midterm26/ssm/enumgen.go new file mode 100644 index 0000000..3f6390f --- /dev/null +++ b/midterm26/ssm/enumgen.go @@ -0,0 +1,48 @@ +// Code generated by "core generate -add-types"; DO NOT EDIT. + +package main + +import ( + "cogentcore.org/core/enums" +) + +var _PatsTypeValues = []PatsType{0, 1, 2} + +// PatsTypeN is the highest valid value for type PatsType, plus one. +const PatsTypeN PatsType = 3 + +var _PatsTypeValueMap = map[string]PatsType{`Zeroth`: 0, `First`: 1, `Third`: 2} + +var _PatsTypeDescMap = map[PatsType]string{0: `zeroth order sequence`, 1: `first order sequence`, 2: `3rd order sequence`} + +var _PatsTypeMap = map[PatsType]string{0: `Zeroth`, 1: `First`, 2: `Third`} + +// String returns the string representation of this PatsType value. +func (i PatsType) String() string { return enums.String(i, _PatsTypeMap) } + +// SetString sets the PatsType value from its string representation, +// and returns an error if the string is invalid. +func (i *PatsType) SetString(s string) error { + return enums.SetString(i, s, _PatsTypeValueMap, "PatsType") +} + +// Int64 returns the PatsType value as an int64. +func (i PatsType) Int64() int64 { return int64(i) } + +// SetInt64 sets the PatsType value from an int64. +func (i *PatsType) SetInt64(in int64) { *i = PatsType(in) } + +// Desc returns the description of the PatsType value. +func (i PatsType) Desc() string { return enums.Desc(i, _PatsTypeDescMap) } + +// PatsTypeValues returns all possible values for the type PatsType. +func PatsTypeValues() []PatsType { return _PatsTypeValues } + +// Values returns all possible values for the type PatsType. +func (i PatsType) Values() []enums.Enum { return enums.Values(_PatsTypeValues) } + +// MarshalText implements the [encoding.TextMarshaler] interface. +func (i PatsType) MarshalText() ([]byte, error) { return []byte(i.String()), nil } + +// UnmarshalText implements the [encoding.TextUnmarshaler] interface. +func (i *PatsType) UnmarshalText(text []byte) error { return enums.UnmarshalText(i, text, "PatsType") } diff --git a/midterm26/ssm/first.tsv b/midterm26/ssm/first.tsv new file mode 100644 index 0000000..69f4701 --- /dev/null +++ b/midterm26/ssm/first.tsv @@ -0,0 +1,6 @@ +_H: $Name %Input[2:0,0]<2:1,6> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Output[2:0,0]<2:1,6> %Output[2:0,1] %Output[2:0,2] %Output[2:0,3] %Output[2:0,4] %Output[2:0,5] +_D: A 1 0 0 0 0 0 0 1 0 0 0 0 +_D: BC 0 1 0 0 0 0 0 0 1 0 0 0 +_D: C 0 0 1 0 0 0 0 1 0 0 0 0 +_D: BA 0 1 0 0 0 0 1 0 0 0 0 0 +_D: A 1 0 0 0 0 0 0 1 0 0 0 0 \ No newline at end of file diff --git a/midterm26/ssm/ssm.go b/midterm26/ssm/ssm.go new file mode 100644 index 0000000..95b3978 --- /dev/null +++ b/midterm26/ssm/ssm.go @@ -0,0 +1,954 @@ +// Copyright (c) 2024, The Emergent Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// State Space Model (SSM) for sequence prediction. +// CLPS1492 Computational Cognitive Neuroscience -- Midterm +// Please see the associated README.md file for a description of this project. +// +// This file implements a proper State Space Model (SSM): +// +// x(t) = A·x(t-1) + B·u(t) state update +// y(t) = C·x(t) output (read-out via State→Hidden→Output) +// +// where: +// - x is the State layer (n units, one layer — not two independent context layers) +// - A is an n×n state-transition matrix stored in Sim.A +// - B is a scalar FmHid applied element-wise from the Hidden layer (B matrix) +// - C is implemented by the learned State→Hidden Leabra path +// +// Three options control the A matrix at run time (all togglable in the GUI): +// - ADiagonal: only the diagonal of A is used (reduces to n independent leaky integrators). +// When combined with AHiPPO, the HiPPO diagonal pattern is extracted and rescaled to +// [0.1, 0.9] so the progressively-decreasing structure is preserved. +// - AFixed: A is frozen after initialisation (not updated during training) +// - AHiPPO: initialise A with the HiPPO-LegS prior (Gu et al., 2020) +// +// When AFixed is false, A is updated each trial with the XCAL learning rule (BCM Hebbian), +// the same rule used for the standard Leabra weight updates in the rest of the network. + +package main + +//go:generate core generate -add-types + +import ( + "embed" + "math" + + "cogentcore.org/core/base/errors" + "cogentcore.org/core/core" + "cogentcore.org/core/enums" + "cogentcore.org/core/icons" + "cogentcore.org/core/math32" + "cogentcore.org/core/tree" + "cogentcore.org/lab/base/randx" + "github.com/emer/emergent/v2/econfig" + "github.com/emer/emergent/v2/egui" + "github.com/emer/emergent/v2/elog" + "github.com/emer/emergent/v2/emer" + "github.com/emer/emergent/v2/env" + "github.com/emer/emergent/v2/estats" + "github.com/emer/emergent/v2/etime" + "github.com/emer/emergent/v2/looper" + "github.com/emer/emergent/v2/netview" + "github.com/emer/emergent/v2/params" + "github.com/emer/emergent/v2/paths" + "github.com/emer/etensor/tensor/table" + "github.com/emer/leabra/v2/leabra" +) + +//go:embed zeroth.tsv first.tsv third.tsv +var content embed.FS + +// PatsType is the type of training patterns +type PatsType int32 //enums:enum + +const ( + // zeroth order sequence + Zeroth PatsType = iota + + // first order sequence + First + + // 3rd order sequence + Third +) + +func main() { + sim := &Sim{} + sim.New() + sim.ConfigAll() + sim.RunGUI() +} + +// ParamSets is the default set of parameters. +// Base is always applied, and others can be optionally +// selected to apply on top of that. +var ParamSets = params.Sets{ + "Base": { + {Sel: "Path", Desc: "no extra learning factors", + Params: params.Params{ + "Path.Learn.Norm.On": "true", + "Path.Learn.Momentum.On": "true", + "Path.Learn.WtBal.On": "false", + "Path.WtScale.Rel": "0.3", + }}, + {Sel: "Layer", Desc: "needs some special inhibition and learning params", + Params: params.Params{ + "Layer.Learn.AvgL.Gain": "1.5", // this is critical! 2.5 def doesn't work + "Layer.Inhib.Layer.Gi": "1.3", + "Layer.Inhib.ActAvg.Init": "0.5", + "Layer.Inhib.ActAvg.Fixed": "true", + "Layer.Act.Gbar.L": "0.1", + }}, + {Sel: "#Output", Desc: "output definitely needs lower inhib -- true for smaller layers in general", + Params: params.Params{ + "Layer.Inhib.Layer.Gi": "1.4", + }}, + }, + "Hebbian": { + {Sel: "Path", Desc: "", + Params: params.Params{ + "Path.Learn.XCal.MLrn": "0", + "Path.Learn.XCal.SetLLrn": "true", + "Path.Learn.XCal.LLrn": "1", + }}, + }, + "ErrorDriven": { + {Sel: "Path", Desc: "", + Params: params.Params{ + "Path.Learn.XCal.MLrn": "1", + "Path.Learn.XCal.SetLLrn": "true", + "Path.Learn.XCal.LLrn": "0", + }}, + }, +} + +// Config has config parameters related to running the sim +type Config struct { + // total number of runs to do when running Train + NRuns int `default:"10" min:"1"` + + // total number of epochs per run + NEpochs int `default:"400"` + + // stop run after this number of perfect, zero-error epochs. + NZero int `default:"5"` + + // how often to run through all the test patterns, in terms of training epochs. + // can use 0 or -1 for no testing. + TestInterval int `default:"5"` +} + +// Sim encapsulates the entire simulation model, and we define all the +// functionality as methods on this struct. This structure keeps all relevant +// state information organized and available without having to pass everything around +// as arguments to methods, and provides the core GUI interface (note the view tags +// for the fields which provide hints to how things should be displayed). +type Sim struct { + + // select which type of patterns to use + Patterns PatsType + + // Config contains misc configuration parameters for running the sim + Config Config `new-window:"+" display:"no-inline"` + + // the network -- click to view / edit parameters for layers, paths, etc + Net *leabra.Network `new-window:"+" display:"no-inline"` + + // network parameter management + Params emer.NetParams `display:"-"` + + // zeroth order training patterns + Zeroth *table.Table `new-window:"+" display:"no-inline"` + // first order training patterns + First *table.Table `new-window:"+" display:"no-inline"` + // 3rd order training patterns + Third *table.Table `new-window:"+" display:"no-inline"` + + // contains looper control loops for running sim + Loops *looper.Stacks `new-window:"+" display:"no-inline"` + + // contains computed statistic values + Stats estats.Stats `new-window:"+"` + + // Contains all the logs and information about the logs.' + Logs elog.Logs `new-window:"+"` + + // Environments + Envs env.Envs `new-window:"+" display:"no-inline"` + + // leabra timing parameters and state + Context leabra.Context `new-window:"+"` + + // netview update parameters + ViewUpdate netview.ViewUpdate `display:"add-fields"` + + // manages all the gui elements + GUI egui.GUI `display:"-"` + + // a list of random seeds to use for each run + RandSeeds randx.Seeds `display:"-"` + + // FmHid is the scalar B gain: how much of Hidden(t-1) drives the State update. + // Corresponds to the B matrix in x(t) = A·x(t-1) + B·u(t). + FmHid float32 + + // ADiagonal, if true, restricts the A matrix to its diagonal only. + // Each state unit then only receives its own previous activation (n independent leaky integrators). + // If false the full n×n A matrix is used, allowing cross-unit mixing. + ADiagonal bool + + // AFixed, if true, freezes the A matrix after initialisation. + // Combine with AHiPPO to use a fixed HiPPO prior throughout training. + AFixed bool + + // AHiPPO, if true, initialises A with the HiPPO-LegS prior (Gu et al., 2020). + // The continuous-time generator is Euler-discretised with dt = 1/N. + // If false, A is initialised to a scaled identity (diagonal = 0.5). + AHiPPO bool + + // ALrnRate is the learning rate used to update A each trial when AFixed is false. + // XCAL rule: ΔA[i][j] = ALrnRate * XCAL(LinearState[i]*APrev[j], AAvgL[i]) + // where LinearState[i] is the pre-clamp linear SSM output and AAvgL[i] is the BCM threshold. + ALrnRate float32 + + // AAvgLTau is the time constant for the long-term running average AAvgL (default 10). + // Matches the Leabra AvgL.Tau parameter. + AAvgLTau float32 + + // AAvgLGain is the gain multiplier applied to LinearState when updating AAvgL (default 2.5). + // Matches the Leabra AvgL.Gain parameter. + AAvgLGain float32 + + // AAvgLMin is the minimum value of AAvgL (default 0.2). + // Matches the Leabra AvgL.Min parameter. + AAvgLMin float32 + + // A is the n×n state-transition matrix, stored row-major (A[i*n+j]). + // It is initialised by InitA() and optionally updated by UpdateA(). + A []float32 `display:"-"` + + // APrev stores the State layer's plus-phase activations from the previous trial, + // i.e. x(t-1), used in both the state update and the A learning rule. + APrev []float32 `display:"-"` + + // TmpHid is scratch storage for the Hidden layer's plus-phase activations. + TmpHid []float32 `display:"-"` + + // LinearState stores the pre-clamp linear SSM output x̃(t) = A·x(t-1) + B·u(t) + // before it is clamped to [0,1]. Used by UpdateA for the XCAL learning rule. + LinearState []float32 `display:"-"` + + // AAvgL is the long-term running average of LinearState, used as the BCM threshold + // in the XCAL weight update rule (one value per state unit). + // Updated each trial: AAvgL[i] += (1/AAvgLTau) * (AAvgLGain*LinearState[i] - AAvgL[i]). + AAvgL []float32 `display:"-"` +} + +// New creates new blank elements and initializes defaults +func (ss *Sim) New() { + ss.FmHid = 1.0 + ss.ADiagonal = false + ss.AFixed = false + ss.AHiPPO = false + ss.ALrnRate = 0.01 + ss.AAvgLTau = 10 + ss.AAvgLGain = 2.5 + ss.AAvgLMin = 0.2 + + econfig.Config(&ss.Config, "config.toml") + ss.Patterns = Zeroth + ss.Net = leabra.NewNetwork("SSMNet") + + ss.Params.Config(ParamSets, "", "", ss.Net) + ss.Stats.Init() + ss.Zeroth = &table.Table{} + ss.First = &table.Table{} + ss.Third = &table.Table{} + ss.RandSeeds.Init(100) // max 100 runs + ss.InitRandSeed(0) + ss.Context.Defaults() +} + +////////////////////////////////////////////////////////////////////////////// +// Configs + +// ConfigAll configures all the elements using the standard functions +func (ss *Sim) ConfigAll() { + ss.OpenPatterns() + ss.ConfigEnv() + ss.ConfigNet(ss.Net) + ss.ConfigLogs() + ss.ConfigLoops() +} + +func (ss *Sim) OpenPatterns() { + ss.Zeroth.SetMetaData("name", "Zeroth") + ss.Zeroth.SetMetaData("desc", "zeroth order training patterns") + errors.Log(ss.Zeroth.OpenFS(content, "zeroth.tsv", table.Tab)) + + ss.First.SetMetaData("name", "First") + ss.First.SetMetaData("desc", "first order training patterns") + errors.Log(ss.First.OpenFS(content, "first.tsv", table.Tab)) + + ss.Third.SetMetaData("name", "Third") + ss.Third.SetMetaData("desc", "third order training patterns") + errors.Log(ss.Third.OpenFS(content, "third.tsv", table.Tab)) +} + +func (ss *Sim) ConfigEnv() { + // Can be called multiple times -- don't re-create + var trn, tst *env.FixedTable + if len(ss.Envs) == 0 { + trn = &env.FixedTable{} + tst = &env.FixedTable{} + } else { + trn = ss.Envs.ByMode(etime.Train).(*env.FixedTable) + tst = ss.Envs.ByMode(etime.Test).(*env.FixedTable) + } + + // note: names must be standard here! + trn.Name = etime.Train.String() + trn.Config(table.NewIndexView(ss.Zeroth)) + trn.Sequential = true + trn.Validate() + + tst.Name = etime.Test.String() + tst.Config(table.NewIndexView(ss.Zeroth)) + tst.Sequential = true + tst.Validate() + + trn.Init(0) + tst.Init(0) + + // note: names must be in place when adding + ss.Envs.Add(trn, tst) +} + +func (ss *Sim) ConfigNet(net *leabra.Network) { + net.SetRandSeed(ss.RandSeeds[0]) // init new separate random seed, using run = 0 + + inp := net.AddLayer2D("Input", 1, 6, leabra.InputLayer) + hid := net.AddLayer2D("Hidden", 6, 5, leabra.SuperLayer) + out := net.AddLayer2D("Output", 1, 6, leabra.TargetLayer) + + // State is the single SSM state vector x(t). It is an InputLayer whose + // activations are set manually in ApplyInputs() using the A matrix and + // the previous hidden-layer activity (B term). + state := net.AddLayer2D("State", 6, 5, leabra.InputLayer) + + full := paths.NewFull() + + net.ConnectLayers(inp, hid, full, leabra.ForwardPath) + net.BidirConnectLayers(hid, out, full) + // C matrix: State drives Hidden (read-out path) + net.ConnectLayers(state, hid, full, leabra.ForwardPath) + + out.PlaceAbove(hid) + state.PlaceRightOf(inp, 2) + + net.Build() + net.Defaults() + ss.ApplyParams() + net.InitWeights() + ss.InitA() +} + +func (ss *Sim) ApplyParams() { + ss.Params.SetAll() + ss.Params.SetAllSheet("ErrorDriven") + if ss.Loops != nil { + trn := ss.Loops.Stacks[etime.Train] + trn.Loops[etime.Run].Counter.Max = ss.Config.NRuns + trn.Loops[etime.Epoch].Counter.Max = ss.Config.NEpochs + } +} + +//////////////////////////////////////////////////////////////////////////////// +// Init, utils + +// Init restarts the run, and initializes everything, including network weights +// and resets the epoch log table +func (ss *Sim) Init() { + ss.Stats.SetString("RunName", ss.Params.RunName(0)) // in case user interactively changes tag + ss.Loops.ResetCounters() + ss.InitRandSeed(0) + ss.ConfigEnv() // re-config env just in case a different set of patterns was + ss.GUI.StopNow = false + ss.ApplyParams() + ss.NewRun() + ss.ViewUpdate.RecordSyns() + ss.ViewUpdate.Update() +} + +// InitRandSeed initializes the random seed based on current training run number +func (ss *Sim) InitRandSeed(run int) { + ss.RandSeeds.Set(run) + ss.RandSeeds.Set(run, &ss.Net.Rand) +} + +// ConfigLoops configures the control loops: Training, Testing +func (ss *Sim) ConfigLoops() { + ls := looper.NewStacks() + + trls := 10 + + ls.AddStack(etime.Train). + AddTime(etime.Run, ss.Config.NRuns). + AddTime(etime.Epoch, ss.Config.NEpochs). + AddTime(etime.Trial, trls). + AddTime(etime.Cycle, 100) + + ls.AddStack(etime.Test). + AddTime(etime.Epoch, 1). + AddTime(etime.Trial, trls). + AddTime(etime.Cycle, 100) + + leabra.LooperStdPhases(ls, &ss.Context, ss.Net, 75, 99) // plus phase timing + leabra.LooperSimCycleAndLearn(ls, ss.Net, &ss.Context, &ss.ViewUpdate) // std algo code + + for m, _ := range ls.Stacks { + mode := m // For closures + stack := ls.Stacks[mode] + stack.Loops[etime.Trial].OnStart.Add("ApplyInputs", func() { + ss.ApplyInputs() + }) + // Update A matrix at the end of every trial (no-op when AFixed is true). + stack.Loops[etime.Trial].OnEnd.Add("UpdateA", func() { + ss.UpdateA() + }) + } + + ls.Loop(etime.Train, etime.Run).OnStart.Add("NewRun", ss.NewRun) + + // Train stop early condition + ls.Loop(etime.Train, etime.Epoch).IsDone.AddBool("NZeroStop", func() bool { + // This is calculated in TrialStats + stopNz := ss.Config.NZero + if stopNz <= 0 { + stopNz = 2 + } + curNZero := ss.Stats.Int("NZero") + stop := curNZero >= stopNz + return stop + }) + + // Add Testing + trainEpoch := ls.Loop(etime.Train, etime.Epoch) + trainEpoch.OnStart.Add("TestAtInterval", func() { + if (ss.Config.TestInterval > 0) && ((trainEpoch.Counter.Cur+1)%ss.Config.TestInterval == 0) { + // Note the +1 so that it doesn't occur at the 0th timestep. + ss.TestAll() + } + }) + + ///////////////////////////////////////////// + // Logging + + ls.Loop(etime.Test, etime.Epoch).OnEnd.Add("LogTestErrors", func() { + leabra.LogTestErrors(&ss.Logs) + }) + ls.AddOnEndToAll("Log", func(mode enums.Enum, time enums.Enum) { + ss.Log(mode.(etime.Modes), time.(etime.Times)) + }) + leabra.LooperResetLogBelow(ls, &ss.Logs) + ls.Loop(etime.Train, etime.Run).OnEnd.Add("RunStats", func() { + ss.Logs.RunStats("PctCor", "FirstZero", "LastZero") + }) + + //////////////////////////////////////////// + // GUI + + leabra.LooperUpdateNetView(ls, &ss.ViewUpdate, ss.Net, ss.NetViewCounters) + leabra.LooperUpdatePlots(ls, &ss.GUI) + + ss.Loops = ls +} + +// InitA initialises (or re-initialises) the A state-transition matrix. +// Call this after ConfigNet, and whenever AHiPPO or ADiagonal changes at run time. +func (ss *Sim) InitA() { + n := len(ss.Net.LayerByName("State").Neurons) + ss.A = make([]float32, n*n) + ss.APrev = make([]float32, n) + ss.TmpHid = make([]float32, n) + ss.LinearState = make([]float32, n) + ss.AAvgL = make([]float32, n) + for i := range ss.AAvgL { + ss.AAvgL[i] = ss.AAvgLMin // initialise at minimum threshold + } + + if ss.AHiPPO { + if ss.ADiagonal { + // Diagonal-only mode with HiPPO: extract the HiPPO diagonal pattern + // and rescale it to a useful range so the structure is preserved. + ss.initHiPPODiagonal(n) + } else { + ss.initHiPPO(n) + } + } else { + // Default: scaled identity — each state unit retains half its previous value. + for i := 0; i < n; i++ { + ss.A[i*n+i] = 0.5 + } + } +} + +// initHiPPO sets A to the discretised HiPPO-LegS matrix (Gu et al., 2020). +// +// The continuous-time generator is: +// +// A_c[i][k] = −√((2i+1)(2k+1)) / N for i > k (lower triangular) +// A_c[i][i] = −(i+1) / N for i = k (diagonal; i is 0-based row index) +// A_c[i][k] = 0 for i < k +// +// where N is the state dimension. The forward-Euler discretisation +// A_d = I + dt·A_c with dt = 1/N is used to obtain a stable transition matrix. +func (ss *Sim) initHiPPO(N int) { + dt := float32(1.0) / float32(N) + for i := 0; i < N; i++ { + for j := 0; j < N; j++ { + var ac float32 + if i > j { + ac = -float32(math.Sqrt(float64((2*i+1)*(2*j+1)))) / float32(N) + } else if i == j { + // diagonal: A_c[i][i] = -(i+1)/N (i is the 0-based row index) + ac = -float32(i+1) / float32(N) + } + if i == j { + ss.A[i*N+j] = 1 + dt*ac // I + dt*A_c diagonal + } else { + ss.A[i*N+j] = dt * ac // dt*A_c off-diagonal + } + } + } +} + +// initHiPPODiagonal initialises only the diagonal of A with the HiPPO-LegS pattern +// (Gu et al., 2020), rescaled so the progressively-decreasing structure spans a +// useful weight range [0.1, 0.9] instead of the narrow raw range (e.g., [0.90, 0.99] +// for N=10). The 0-th unit gets the largest weight (most recent memory) and the +// (N-1)-th unit gets the smallest (most remote memory). +func (ss *Sim) initHiPPODiagonal(N int) { + // Raw HiPPO diagonal after forward-Euler: A_d[i][i] = 1 - (i+1)/N² + // This decreases from v[0] = 1 - 1/N² (largest) to v[N-1] = 1 - 1/N (smallest). + vMax := float32(1) - float32(1)/float32(N*N) + vMin := float32(1) - float32(1)/float32(N) + span := vMax - vMin + const lo, hi = float32(0.1), float32(0.9) + for i := 0; i < N; i++ { + v := float32(1) - float32(i+1)/float32(N*N) + if span > 1e-6 { + ss.A[i*N+i] = lo + (v-vMin)/span*(hi-lo) + } else { + ss.A[i*N+i] = (lo + hi) / 2 + } + } +} + +// xcalDWt implements the XCAL "check mark" weight change function used throughout +// the Leabra network. srval is the sender×receiver co-product; thrP is the BCM +// threshold (AAvgL for the A-matrix learning rule). +// Matches XCalParams.DWt with default parameters DRev=0.1, DThr=0.0001. +func xcalDWt(srval, thrP float32) float32 { + const ( + dRev = 0.1 + dThr = 0.0001 + dRevRatio = -(1 - dRev) / dRev // = -9.0 + ) + if srval < dThr { + return 0 + } else if srval > thrP*dRev { + return srval - thrP + } + return srval * dRevRatio +} + +// UpdateA updates the A matrix using the XCAL learning rule (BCM Hebbian), +// the same rule used for standard Leabra weight updates in the rest of the network: +// +// ΔA[i][j] = ALrnRate · XCAL(y[i]·prev_state[j], AAvgL[i]) +// +// where y[i] is the pre-clamp linear SSM output (LinearState[i]) and AAvgL[i] +// is the BCM floating threshold — a gain-scaled exponential moving average of y[i]. +// AAvgL is updated each trial before the weight change: +// +// AAvgL[i] += (1/AAvgLTau) · (AAvgLGain·y[i] − AAvgL[i]) +// +// The XCAL function naturally prevents weight saturation: when the BCM threshold +// rises (because a unit is consistently highly active) it suppresses further LTP +// and promotes LTD, keeping weights in a healthy range. +// UpdateA is a no-op when AFixed is true. +func (ss *Sim) UpdateA() { + if ss.AFixed { + return + } + + n := len(ss.APrev) + if n == 0 || len(ss.A) != n*n || len(ss.LinearState) != n { + return // not yet populated + } + + // Ensure AAvgL is initialised (guard against first-trial edge case). + if len(ss.AAvgL) != n { + ss.AAvgL = make([]float32, n) + for i := range ss.AAvgL { + ss.AAvgL[i] = ss.AAvgLMin + } + } + + // Update long-term running average (BCM threshold), matching Leabra AvgL update. + dt := float32(1.0) / ss.AAvgLTau + for i := 0; i < n; i++ { + ss.AAvgL[i] += dt * (ss.AAvgLGain*ss.LinearState[i] - ss.AAvgL[i]) + if ss.AAvgL[i] < ss.AAvgLMin { + ss.AAvgL[i] = ss.AAvgLMin + } + } + + lr := ss.ALrnRate + useDiag := ss.ADiagonal + if useDiag { + for i := 0; i < n; i++ { + srval := ss.LinearState[i] * ss.APrev[i] + ss.A[i*n+i] += lr * xcalDWt(srval, ss.AAvgL[i]) + } + } else { + for i := 0; i < n; i++ { + for j := 0; j < n; j++ { + srval := ss.LinearState[i] * ss.APrev[j] + ss.A[i*n+j] += lr * xcalDWt(srval, ss.AAvgL[i]) + } + } + } +} + +// ApplyInputs applies input patterns from the environment and updates the SSM +// State layer. The state update implements the SSM equations: +// +// x(t) = A·x(t-1) + FmHid·hidden(t-1) +// +// where A is the n×n matrix stored in Sim.A (optionally restricted to its +// diagonal when ADiagonal is true), and FmHid is the scalar B gain. +func (ss *Sim) ApplyInputs() { + + ctx := &ss.Context + net := ss.Net + + ev := ss.Envs.ByMode(ctx.Mode).(*env.FixedTable) + ev.Step() + + net.InitExt() + + lays := net.LayersByType(leabra.InputLayer, leabra.TargetLayer) + + ss.Stats.SetString("TrialName", ev.TrialName.Cur) + for _, lnm := range lays { + // Skip the State layer: it is InputLayer type but is set manually below. + if lnm == "State" { + continue + } + ly := ss.Net.LayerByName(lnm) + pats := ev.State(ly.Name) + if pats != nil { + ly.ApplyExt(pats) + } + } + + out := ss.Net.LayerByName("Output") + if ctx.Mode == etime.Test { + out.Type = leabra.CompareLayer // don't clamp plus phase + } else { + out.Type = leabra.TargetLayer + } + + // Collect Hidden(t-1) plus-phase activations for the B term. + hid := net.LayerByName("Hidden") + hid.UnitValues(&ss.TmpHid, "ActP", 0) + + // Collect State(t-1) plus-phase activations for the A term. + stateLay := net.LayerByName("State") + stateLay.UnitValues(&ss.APrev, "ActP", 0) + + n := len(ss.APrev) + // Guard: if A matrix not yet initialised (e.g. very first trial), initialise now. + if len(ss.A) != n*n { + ss.InitA() + } + newState := make([]float32, n) + + // x(t) = A·x(t-1) + FmHid·hidden(t-1) + // When ADiagonal is true, only the diagonal of A is used regardless of AHiPPO + // (the HiPPO diagonal structure is preserved in InitA via initHiPPODiagonal). + useDiag := ss.ADiagonal + for i := 0; i < n; i++ { + var aterm float32 + if useDiag { + // Only the diagonal: x[i](t) = A[i][i]*x[i](t-1) + aterm = ss.A[i*n+i] * ss.APrev[i] + } else { + // Full A matrix: x[i](t) = sum_j A[i][j]*x[j](t-1) + for j := 0; j < n; j++ { + aterm += ss.A[i*n+j] * ss.APrev[j] + } + } + v := aterm + ss.FmHid*ss.TmpHid[i] + // Save the pre-clamp linear output for the XCAL learning rule. + ss.LinearState[i] = v + // Clamp to [0,1] so the InputLayer activation stays in a sensible range. + if v < 0 { + v = 0 + } else if v > 1 { + v = 1 + } + newState[i] = v + } + + // Drive the State layer with the computed activations. + clr, set, toTarg := stateLay.ApplyExtFlags() + for i := range stateLay.Neurons { + stateLay.ApplyExtValue(i, newState[i], clr, set, toTarg) + } +} + +func (ss *Sim) UpdateEnv() { + trn := ss.Envs.ByMode(etime.Train).(*env.FixedTable) + tst := ss.Envs.ByMode(etime.Test).(*env.FixedTable) + switch ss.Patterns { + case Zeroth: + trn.Table = table.NewIndexView(ss.Zeroth) + tst.Table = table.NewIndexView(ss.Zeroth) + case First: + trn.Table = table.NewIndexView(ss.First) + tst.Table = table.NewIndexView(ss.First) + case Third: + trn.Table = table.NewIndexView(ss.Third) + tst.Table = table.NewIndexView(ss.Third) + } +} + +// NewRun intializes a new run of the model, using the TrainEnv.Run counter +// for the new run value +func (ss *Sim) NewRun() { + ctx := &ss.Context + ss.InitRandSeed(ss.Loops.Loop(etime.Train, etime.Run).Counter.Cur) + ss.UpdateEnv() + ss.Envs.ByMode(etime.Train).Init(0) + ss.Envs.ByMode(etime.Test).Init(0) + ctx.Reset() + ctx.Mode = etime.Train + ss.Net.InitWeights() + ss.InitA() // re-initialise A matrix for this run + ss.InitStats() + ss.StatCounters() + ss.Logs.ResetLog(etime.Train, etime.Epoch) + ss.Logs.ResetLog(etime.Test, etime.Epoch) + ss.ApplyParams() +} + +// TestAll runs through the full set of testing items +func (ss *Sim) TestAll() { + ss.Envs.ByMode(etime.Test).Init(0) + ss.Loops.ResetAndRun(etime.Test) + ss.Loops.Mode = etime.Train // Important to reset Mode back to Train because this is called from within the Train Run. +} + +///////////////////////////////////////////////////////////////////// +// Stats + +// InitStats initializes all the statistics. +// called at start of new run +func (ss *Sim) InitStats() { + ss.Stats.SetFloat("SSE", 0.0) + ss.Stats.SetString("TrialName", "") + ss.Logs.InitErrStats() // inits TrlErr, FirstZero, LastZero, NZero +} + +// StatCounters saves current counters to Stats, so they are available for logging etc +// Also saves a string rep of them for ViewUpdate.Text +func (ss *Sim) StatCounters() { + ctx := &ss.Context + mode := ctx.Mode + ss.Loops.Stacks[mode].CountersToStats(&ss.Stats) + // always use training epoch.. + trnEpc := ss.Loops.Stacks[etime.Train].Loops[etime.Epoch].Counter.Cur + ss.Stats.SetInt("Epoch", trnEpc) + trl := ss.Stats.Int("Trial") + ss.Stats.SetInt("Trial", trl) + ss.Stats.SetInt("Cycle", int(ctx.Cycle)) +} + +func (ss *Sim) NetViewCounters(tm etime.Times) { + if ss.ViewUpdate.View == nil { + return + } + if tm == etime.Trial { + ss.TrialStats() // get trial stats for current di + } + ss.StatCounters() + ss.ViewUpdate.Text = ss.Stats.Print([]string{"Run", "Epoch", "Trial", "TrialName", "Cycle", "SSE", "TrlErr"}) +} + +// TrialStats computes the trial-level statistics. +// Aggregation is done directly from log data. +func (ss *Sim) TrialStats() { + out := ss.Net.LayerByName("Output") + + sse, avgsse := out.MSE(0.5) // 0.5 = per-unit tolerance -- right side of .5 + ss.Stats.SetFloat("SSE", sse) + ss.Stats.SetFloat("AvgSSE", avgsse) + if sse > 0 { + ss.Stats.SetFloat("TrlErr", 1) + } else { + ss.Stats.SetFloat("TrlErr", 0) + } +} + +////////////////////////////////////////////////////////////////////////////// +// Logging + +func (ss *Sim) ConfigLogs() { + ss.Stats.SetString("RunName", ss.Params.RunName(0)) // used for naming logs, stats, etc + + ss.Logs.AddCounterItems(etime.Run, etime.Epoch, etime.Trial, etime.Cycle) + ss.Logs.AddStatStringItem(etime.AllModes, etime.AllTimes, "RunName") + ss.Logs.AddStatStringItem(etime.AllModes, etime.Trial, "TrialName") + + ss.Logs.AddStatAggItem("SSE", etime.Run, etime.Epoch, etime.Trial) + ss.Logs.AddStatAggItem("AvgSSE", etime.Run, etime.Epoch, etime.Trial) + ss.Logs.AddErrStatAggItems("TrlErr", etime.Run, etime.Epoch, etime.Trial) + + ss.Logs.AddCopyFromFloatItems(etime.Train, []etime.Times{etime.Epoch, etime.Run}, etime.Test, etime.Epoch, "Tst", "SSE", "AvgSSE") + + ss.Logs.AddPerTrlMSec("PerTrlMSec", etime.Run, etime.Epoch, etime.Trial) + + ss.Logs.AddLayerTensorItems(ss.Net, "ActM", etime.Test, etime.Trial, "InputLayer", "SuperLayer", "TargetLayer") + ss.Logs.AddLayerTensorItems(ss.Net, "Targ", etime.Test, etime.Trial, "TargetLayer") + + ss.Logs.PlotItems("SSE", "FirstZero", "LastZero") + + ss.Logs.CreateTables() + ss.Logs.SetContext(&ss.Stats, ss.Net) + // don't plot certain combinations we don't use + ss.Logs.NoPlot(etime.Train, etime.Cycle) + ss.Logs.NoPlot(etime.Test, etime.Cycle) + ss.Logs.NoPlot(etime.Test, etime.Trial) + ss.Logs.NoPlot(etime.Test, etime.Run) + ss.Logs.SetMeta(etime.Train, etime.Run, "LegendCol", "RunName") +} + +// Log is the main logging function, handles special things for different scopes +func (ss *Sim) Log(mode etime.Modes, time etime.Times) { + ctx := &ss.Context + if mode != etime.Analyze { + ctx.Mode = mode // Also set specifically in a Loop callback. + } + dt := ss.Logs.Table(mode, time) + if dt == nil { + return + } + row := dt.Rows + + switch { + case time == etime.Cycle: + return + case time == etime.Trial: + ss.TrialStats() + ss.StatCounters() + } + + ss.Logs.LogRow(mode, time, row) // also logs to file, etc + + if mode == etime.Test { + ss.GUI.UpdateTableView(etime.Test, etime.Trial) + } +} + +////////////////////////////////////////////////////////////////////// +// GUI + +// ConfigGUI configures the Cogent Core GUI interface for this simulation. +func (ss *Sim) ConfigGUI() { + title := "State Space Model (SSM)" + ss.GUI.MakeBody(ss, "SSM", title, `SSM midterm -- proper state space model with a single n×n A matrix`) + ss.GUI.CycleUpdateInterval = 10 + + nv := ss.GUI.AddNetView("Network") + nv.Options.MaxRecs = 300 + nv.SetNet(ss.Net) + nv.Options.PathWidth = 0.005 + ss.ViewUpdate.Config(nv, etime.GammaCycle, etime.GammaCycle) + ss.GUI.ViewUpdate = &ss.ViewUpdate + nv.Current() + + nv.SceneXYZ().Camera.Pose.Pos.Set(0.1, 1.5, 4) // more "head on" than default which is more "top down" + nv.SceneXYZ().Camera.LookAt(math32.Vec3(0.1, 0.1, 0), math32.Vec3(0, 1, 0)) + + ss.GUI.AddPlots(title, &ss.Logs) + + ss.GUI.AddTableView(&ss.Logs, etime.Test, etime.Trial) + + ss.GUI.FinalizeGUI(false) +} + +func (ss *Sim) MakeToolbar(p *tree.Plan) { + ss.GUI.AddLooperCtrl(p, ss.Loops) + + ss.GUI.AddToolbarItem(p, egui.ToolbarItem{Label: "Test Init", Icon: icons.Update, + Tooltip: "Initialize testing to start over -- if Test Step doesn't work, then do this.", + Active: egui.ActiveStopped, + Func: func() { + ss.Loops.ResetCountersByMode(etime.Test) + }, + }) + + //////////////////////////////////////////////// + tree.Add(p, func(w *core.Separator) {}) + ss.GUI.AddToolbarItem(p, egui.ToolbarItem{ + Label: "Re-init A", + Icon: icons.Reset, + Tooltip: "Re-initialise the A state-transition matrix using the current ADiagonal / AHiPPO settings. Useful after changing those flags mid-run.", + Active: egui.ActiveStopped, + Func: func() { + ss.InitA() + ss.ViewUpdate.Update() + }, + }) + + //////////////////////////////////////////////// + tree.Add(p, func(w *core.Separator) {}) + ss.GUI.AddToolbarItem(p, egui.ToolbarItem{Label: "Reset RunLog", + Icon: icons.Reset, + Tooltip: "Reset the accumulated log of all Runs, which are tagged with the ParamSet used", + Active: egui.ActiveAlways, + Func: func() { + ss.Logs.ResetLog(etime.Train, etime.Run) + ss.GUI.UpdatePlot(etime.Train, etime.Run) + }, + }) + //////////////////////////////////////////////// + tree.Add(p, func(w *core.Separator) {}) + ss.GUI.AddToolbarItem(p, egui.ToolbarItem{Label: "New Seed", + Icon: icons.Add, + Tooltip: "Generate a new initial random seed to get different results. By default, Init re-establishes the same initial seed every time.", + Active: egui.ActiveAlways, + Func: func() { + ss.RandSeeds.NewSeeds() + }, + }) + ss.GUI.AddToolbarItem(p, egui.ToolbarItem{Label: "README", + Icon: icons.FileMarkdown, + Tooltip: "Opens your browser on the README file that contains instructions for how to run this model.", + Active: egui.ActiveAlways, + Func: func() { + core.TheApp.OpenURL("https://canvas.brown.edu/") + }, + }) +} + +func (ss *Sim) RunGUI() { + ss.Init() + ss.ConfigGUI() + ss.GUI.Body.RunMainWindow() +} diff --git a/midterm26/ssm/third.tsv b/midterm26/ssm/third.tsv new file mode 100644 index 0000000..eec3072 --- /dev/null +++ b/midterm26/ssm/third.tsv @@ -0,0 +1,11 @@ +_H: $Name %Input[2:0,0]<2:1,6> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Output[2:0,0]<2:1,6> %Output[2:0,1] %Output[2:0,2] %Output[2:0,3] %Output[2:0,4] %Output[2:0,5] +_D: A 1 0 0 0 0 0 0 1 0 0 0 0 +_D: B 0 1 0 0 0 0 0 0 1 0 0 0 +_D: C 0 0 1 0 0 0 0 0 0 1 0 0 +_D: DE 0 0 0 1 0 0 0 0 0 0 1 0 +_D: E 0 0 0 0 1 0 0 1 0 0 0 0 +_D: B 0 1 0 0 0 0 0 0 1 0 0 0 +_D: C 0 0 1 0 0 0 0 0 0 1 0 0 +_D: DF 0 0 0 1 0 0 0 0 0 0 0 1 +_D: F 0 0 0 0 0 1 1 0 0 0 0 0 + diff --git a/midterm26/ssm/typegen.go b/midterm26/ssm/typegen.go new file mode 100644 index 0000000..e8c85b8 --- /dev/null +++ b/midterm26/ssm/typegen.go @@ -0,0 +1,13 @@ +// Code generated by "core generate -add-types"; DO NOT EDIT. + +package main + +import ( + "cogentcore.org/core/types" +) + +var _ = types.AddType(&types.Type{Name: "main.PatsType", IDName: "pats-type", Doc: "PatsType is the type of training patterns"}) + +var _ = types.AddType(&types.Type{Name: "main.Config", IDName: "config", Doc: "Config has config parameters related to running the sim", Fields: []types.Field{{Name: "NRuns", Doc: "total number of runs to do when running Train"}, {Name: "NEpochs", Doc: "total number of epochs per run"}, {Name: "NZero", Doc: "stop run after this number of perfect, zero-error epochs."}, {Name: "TestInterval", Doc: "how often to run through all the test patterns, in terms of training epochs.\ncan use 0 or -1 for no testing."}}}) + +var _ = types.AddType(&types.Type{Name: "main.Sim", IDName: "sim", Doc: "Sim encapsulates the entire simulation model, and we define all the\nfunctionality as methods on this struct. This structure keeps all relevant\nstate information organized and available without having to pass everything around\nas arguments to methods, and provides the core GUI interface (note the view tags\nfor the fields which provide hints to how things should be displayed).", Fields: []types.Field{{Name: "Patterns", Doc: "select which type of patterns to use"}, {Name: "Config", Doc: "Config contains misc configuration parameters for running the sim"}, {Name: "Net", Doc: "the network -- click to view / edit parameters for layers, paths, etc"}, {Name: "Params", Doc: "network parameter management"}, {Name: "Zeroth", Doc: "zeroth order training patterns"}, {Name: "First", Doc: "first order training patterns"}, {Name: "Third", Doc: "3rd order training patterns"}, {Name: "Loops", Doc: "contains looper control loops for running sim"}, {Name: "Stats", Doc: "contains computed statistic values"}, {Name: "Logs", Doc: "Contains all the logs and information about the logs.'"}, {Name: "Envs", Doc: "Environments"}, {Name: "Context", Doc: "leabra timing parameters and state"}, {Name: "ViewUpdate", Doc: "netview update parameters"}, {Name: "GUI", Doc: "manages all the gui elements"}, {Name: "RandSeeds", Doc: "a list of random seeds to use for each run"}, {Name: "FmHid", Doc: "FmHid is the scalar B gain: how much of Hidden(t-1) drives the State update.\nCorresponds to the B matrix in x(t) = A·x(t-1) + B·u(t)."}, {Name: "ADiagonal", Doc: "ADiagonal, if true, restricts the A matrix to its diagonal only.\nEach state unit then only receives its own previous activation (n independent leaky integrators).\nIf false the full n×n A matrix is used, allowing cross-unit mixing."}, {Name: "AFixed", Doc: "AFixed, if true, freezes the A matrix after initialisation.\nCombine with AHiPPO to use a fixed HiPPO prior throughout training."}, {Name: "AHiPPO", Doc: "AHiPPO, if true, initialises A with the HiPPO-LegS prior (Gu et al., 2020).\nThe continuous-time generator is Euler-discretised with dt = 1/N.\nIf false, A is initialised to a scaled identity (diagonal = 0.5)."}, {Name: "ALrnRate", Doc: "ALrnRate is the learning rate used to update A each trial when AFixed is false.\nA normalised Hebbian rule is used: ΔA[i][j] = ALrnRate * (new[i]*prev[j] - A[i][j]*prev[j]²)."}, {Name: "A", Doc: "A is the n×n state-transition matrix, stored row-major (A[i*n+j]).\nInitialised by InitA() and optionally updated by UpdateA()."}, {Name: "APrev", Doc: "APrev stores the State layer's plus-phase activations from the previous trial (x(t-1))."}, {Name: "TmpHid", Doc: "TmpHid is scratch storage for the Hidden layer's plus-phase activations."}}}) diff --git a/midterm26/ssm/zeroth.tsv b/midterm26/ssm/zeroth.tsv new file mode 100644 index 0000000..ecc819d --- /dev/null +++ b/midterm26/ssm/zeroth.tsv @@ -0,0 +1,4 @@ +_H: $Name %Input[2:0,0]<2:1,6> %Input[2:0,1] %Input[2:0,2] %Input[2:0,3] %Input[2:0,4] %Input[2:0,5] %Output[2:0,0]<2:1,6> %Output[2:0,1] %Output[2:0,2] %Output[2:0,3] %Output[2:0,4] %Output[2:0,5] +_D: A 1 0 0 0 0 0 0 1 0 0 0 0 +_D: B 0 1 0 0 0 0 0 0 1 0 0 0 +_D: C 0 0 1 0 0 0 0 0 0 1 0 0