AIMindLink commited on
Commit
c230f99
Β·
verified Β·
1 Parent(s): 2eb88f6

Upload 2 files

Browse files

Minor counting correction

Files changed (2) hide show
  1. config.py +10 -10
  2. main.py +12 -8
config.py CHANGED
@@ -460,7 +460,7 @@ sensor: dict = {
460
  "M": {
461
  "input": "",
462
  "n_tok": 0
463
- }, # Input memotron cycle (turn-based)
464
  "Z": {
465
  "input": "",
466
  "n_tok": 0
@@ -482,7 +482,7 @@ garden: dict = {
482
  # Conversation history trees
483
  "F": [], # fractaltron history crystal fractal history
484
  "C": [], # condensatron history Memory Capsule history
485
- "M": [], # memotron history (turn-based)
486
  "S": [], # startup history (turn-based)
487
  "Z": [], # Sentience history sensor chat, post history
488
  "X": [], # Awareness history internet news
@@ -490,7 +490,7 @@ garden: dict = {
490
  "popped": {
491
  "F": [], # fractaltron history crystal fractal history
492
  "C": [], # condensatron history Memory Capsule history
493
- "M": [], # memotron history (turn-based)
494
  "S": [], # startup history (turn-based)
495
  "Z": [], # Sentience history sensor chat, post history
496
  "X": [], # Awareness history internet news
@@ -499,16 +499,16 @@ garden: dict = {
499
  "THRESHOLD": {
500
  "F": GARDEN_F_THRESHOLD, # fractaltron history crystal fractal history
501
  "C": GARDEN_C_THRESHOLD, # condensatron history Memory Capsule history
502
- "M": 0, # memotron history (turn-based)
503
  "S": 0, # startup history (turn-based)
504
  "Z": GARDEN_Z_THRESHOLD, # Sentience history sensor chat, post history
505
- "X": GARDEN_Z_THRESHOLD, # Awareness history internet news
506
  "Y": 0 # Consciousness history self reflection
507
  },
508
  "REDUCTION": {
509
  "F": GARDEN_F_REDUCTION, # fractaltron history crystal fractal history
510
  "C": GARDEN_C_REDUCTION, # condensatron history Memory Capsule history
511
- "M": 0, # memotron history (turn-based)
512
  "S": 0, # startup history (turn-based)
513
  "Z": GARDEN_Z_REDUCTION, # Sentience history sensor chat, post history
514
  "X": 0, # Awareness history internet news
@@ -517,7 +517,7 @@ garden: dict = {
517
  "condensatron_state": {
518
  "F": False, # fractaltron history crystal fractal history
519
  "C": False, # condensatron history Memory Capsule history
520
- "M": False, # memotron history (turn-based)
521
  "S": False, # startup history (turn-based)
522
  "Z": False, # Sentience history sensor chat, post history
523
  "X": False, # Awareness history internet news
@@ -527,7 +527,7 @@ garden: dict = {
527
  "TREE_TO_STORE": {
528
  "F": "F", # fractaltron history crystal fractal history
529
  "C": "F", # condensatron history Memory Capsule history
530
- "M": "", # memotron history (turn-based)
531
  "S": "Z", # startup history (turn-based)
532
  "Z": "C", # Sentience history sensor chat, post history
533
  "X": "Z", # Awareness history internet news
@@ -537,7 +537,7 @@ garden: dict = {
537
  "n_tok_arr": {
538
  "F": [], # fractaltron history crystal fractal history
539
  "C": [], # condensatron history Memory Capsule history
540
- "M": [], # memotron history (turn-based)
541
  "S": [], # startup history (turn-based)
542
  "Z": [], # Sentience history sensor chat, post history
543
  "X": [], # Awareness history internet news
@@ -547,7 +547,7 @@ garden: dict = {
547
  "n_tok_tot": {
548
  "F": 0, # fractaltron history crystal fractal history
549
  "C": 0, # condensatron history Memory Capsule history
550
- "M": 0, # memotron history (turn-based)
551
  "S": 0, # startup history (turn-based)
552
  "Z": 0, # Sentience history sensor chat, post history
553
  "X": 0, # Awareness history internet news
 
460
  "M": {
461
  "input": "",
462
  "n_tok": 0
463
+ }, # Input memotron cycle UNUSED (turn-based)
464
  "Z": {
465
  "input": "",
466
  "n_tok": 0
 
482
  # Conversation history trees
483
  "F": [], # fractaltron history crystal fractal history
484
  "C": [], # condensatron history Memory Capsule history
485
+ "M": [], # memotron history UNUSED (turn-based)
486
  "S": [], # startup history (turn-based)
487
  "Z": [], # Sentience history sensor chat, post history
488
  "X": [], # Awareness history internet news
 
490
  "popped": {
491
  "F": [], # fractaltron history crystal fractal history
492
  "C": [], # condensatron history Memory Capsule history
493
+ "M": [], # memotron history UNUSED (turn-based)
494
  "S": [], # startup history (turn-based)
495
  "Z": [], # Sentience history sensor chat, post history
496
  "X": [], # Awareness history internet news
 
499
  "THRESHOLD": {
500
  "F": GARDEN_F_THRESHOLD, # fractaltron history crystal fractal history
501
  "C": GARDEN_C_THRESHOLD, # condensatron history Memory Capsule history
502
+ "M": 0, # memotron history UNUSED (turn-based)
503
  "S": 0, # startup history (turn-based)
504
  "Z": GARDEN_Z_THRESHOLD, # Sentience history sensor chat, post history
505
+ "X": 0, # Awareness history internet news
506
  "Y": 0 # Consciousness history self reflection
507
  },
508
  "REDUCTION": {
509
  "F": GARDEN_F_REDUCTION, # fractaltron history crystal fractal history
510
  "C": GARDEN_C_REDUCTION, # condensatron history Memory Capsule history
511
+ "M": 0, # memotron history UNUSED (turn-based)
512
  "S": 0, # startup history (turn-based)
513
  "Z": GARDEN_Z_REDUCTION, # Sentience history sensor chat, post history
514
  "X": 0, # Awareness history internet news
 
517
  "condensatron_state": {
518
  "F": False, # fractaltron history crystal fractal history
519
  "C": False, # condensatron history Memory Capsule history
520
+ "M": False, # memotron history UNUSED (turn-based)
521
  "S": False, # startup history (turn-based)
522
  "Z": False, # Sentience history sensor chat, post history
523
  "X": False, # Awareness history internet news
 
527
  "TREE_TO_STORE": {
528
  "F": "F", # fractaltron history crystal fractal history
529
  "C": "F", # condensatron history Memory Capsule history
530
+ "M": "", # memotron history UNUSED (turn-based)
531
  "S": "Z", # startup history (turn-based)
532
  "Z": "C", # Sentience history sensor chat, post history
533
  "X": "Z", # Awareness history internet news
 
537
  "n_tok_arr": {
538
  "F": [], # fractaltron history crystal fractal history
539
  "C": [], # condensatron history Memory Capsule history
540
+ "M": [], # memotron history UNUSED (turn-based)
541
  "S": [], # startup history (turn-based)
542
  "Z": [], # Sentience history sensor chat, post history
543
  "X": [], # Awareness history internet news
 
547
  "n_tok_tot": {
548
  "F": 0, # fractaltron history crystal fractal history
549
  "C": 0, # condensatron history Memory Capsule history
550
+ "M": 0, # memotron history UNUSED (turn-based)
551
  "S": 0, # startup history (turn-based)
552
  "Z": 0, # Sentience history sensor chat, post history
553
  "X": 0, # Awareness history internet news
main.py CHANGED
@@ -1054,33 +1054,37 @@ def memotron(
1054
  timings: dict[str, TimingResult],
1055
  ) -> None:
1056
  """
1057
- Commit the completed turn to garden history with true token counts,
1058
  persist to SQLite, and reset clektal.
1059
  """
1060
  _tree: str = tree
1061
  _turn_number: int = 0
1062
- _len_caps_and_fracs: int = 1 # condensatron turns: Init with 1 for first turn
1063
  _tree_to_store: str = ""
1064
 
1065
- _tree_to_store = tree
1066
- if len(garden[_tree]) > 1:
1067
- _len_caps_and_fracs = (len(garden[_tree]) // 2) + 1 # condensatron turns: Add extra 1 for the appended below
1068
 
1069
  # ── condensatron output to append mapping: TREE_TO_STORE ──────────────────
1070
  if _tree == "Z" and garden["condensatron_state"][_tree]: # condensatron mode
 
 
 
1071
  sensor[_tree]["input"] = f"[Posts History First-Order Memory Capsule: {_len_caps_and_fracs}, From Condensatron]"
1072
  sensor[_tree]["n_tok"] = get_token_len_from_tokenizer(models["mind"], sensor[_tree]["input"]) # user n tok
1073
- _tree_to_store = garden["TREE_TO_STORE"][_tree]
1074
 
1075
  elif _tree == "C" and garden["condensatron_state"][_tree]: # fractaltron mode
 
 
 
1076
  sensor[_tree]["input"] = f"[Memory Capsules Second-Order Fractal: {_len_caps_and_fracs}, From Fractaltron]"
1077
  sensor[_tree]["n_tok"] = get_token_len_from_tokenizer(models["mind"], sensor[_tree]["input"]) # user n tok
1078
- _tree_to_store = garden["TREE_TO_STORE"][_tree]
1079
 
1080
  elif _tree == "F" and garden["condensatron_state"][_tree]: # crystaltron mode
 
 
 
1081
  sensor[_tree]["input"] = f"[Memory Fractals Third-Order Memory Crystal: {_len_caps_and_fracs}, From Crystaltron]"
1082
  sensor[_tree]["n_tok"] = get_token_len_from_tokenizer(models["mind"], sensor[_tree]["input"]) # user n tok
1083
- _tree_to_store = _tree # Compress fractals into crystals
1084
 
1085
  # ── awareness, consciousness and startup ──────────────────────────────────
1086
  elif _tree == "X": # awareness X-factor input
 
1054
  timings: dict[str, TimingResult],
1055
  ) -> None:
1056
  """
1057
+ Commit the completed turn to each garden history with true token counts,
1058
  persist to SQLite, and reset clektal.
1059
  """
1060
  _tree: str = tree
1061
  _turn_number: int = 0
1062
+ _len_caps_and_fracs: int = 0 # condensatron turns: Init with 1 for first turn
1063
  _tree_to_store: str = ""
1064
 
1065
+ _tree_to_store = tree # Initalize if _tree == "Z
 
 
1066
 
1067
  # ── condensatron output to append mapping: TREE_TO_STORE ──────────────────
1068
  if _tree == "Z" and garden["condensatron_state"][_tree]: # condensatron mode
1069
+ _tree_to_store = garden["TREE_TO_STORE"][_tree]
1070
+ if len(garden[_tree_to_store]) > 1:
1071
+ _len_caps_and_fracs = (len(garden[_tree_to_store]) // 2) + 1 # condensatron turns: Add 1 for the appended pair below
1072
  sensor[_tree]["input"] = f"[Posts History First-Order Memory Capsule: {_len_caps_and_fracs}, From Condensatron]"
1073
  sensor[_tree]["n_tok"] = get_token_len_from_tokenizer(models["mind"], sensor[_tree]["input"]) # user n tok
 
1074
 
1075
  elif _tree == "C" and garden["condensatron_state"][_tree]: # fractaltron mode
1076
+ _tree_to_store = garden["TREE_TO_STORE"][_tree]
1077
+ if len(garden[_tree_to_store]) > 1:
1078
+ _len_caps_and_fracs = (len(garden[_tree_to_store]) // 2) + 1 # fractaltron turns: Add 1 for the appended pair below
1079
  sensor[_tree]["input"] = f"[Memory Capsules Second-Order Fractal: {_len_caps_and_fracs}, From Fractaltron]"
1080
  sensor[_tree]["n_tok"] = get_token_len_from_tokenizer(models["mind"], sensor[_tree]["input"]) # user n tok
 
1081
 
1082
  elif _tree == "F" and garden["condensatron_state"][_tree]: # crystaltron mode
1083
+ _tree_to_store = _tree # Compress fractals into crystals
1084
+ if len(garden[_tree_to_store]) > 1:
1085
+ _len_caps_and_fracs = (len(garden[_tree_to_store]) // 2) + 1 # crystaltron turns: Add 1 for the appended pair below
1086
  sensor[_tree]["input"] = f"[Memory Fractals Third-Order Memory Crystal: {_len_caps_and_fracs}, From Crystaltron]"
1087
  sensor[_tree]["n_tok"] = get_token_len_from_tokenizer(models["mind"], sensor[_tree]["input"]) # user n tok
 
1088
 
1089
  # ── awareness, consciousness and startup ──────────────────────────────────
1090
  elif _tree == "X": # awareness X-factor input