ReJuvenate module of the

Immortal English and Russian bilingual ghost.pl AI in Perl

Mens Latina in Latin -- MindForth for Robots

  /^^^^^^^^^^^\  ReJuvenate Recycles Old Memories /^^^^^^^^^^^\
 /   EYE       \            _________________    /    EAR      \
|               |CONCEPTS  /                 \  |  ___________  |
|   _______     |   | | | /     MainLoop      \ | / MindBoot  \ |
|  / old   \    |   | | | \___________________/ || memory vault||
| / image   \!!!|!!!|!|!|   |    | | |    |     ||             ||
| \ recog   /---|---|-|-+ __V___ | | |  __V___  || "students"  ||
|  \_______/    |   |s| |(Tabula)| } | /      \ || "read"      ||
|               |   |t| | \Rasa/ | | |(Volition)|| "books"     ||
|               |   |u| |  \__/  | | | \______/ | \___________/ |
|               |   |d|b|   _____| | |   |   |  |               |
|   visual      |  r|e|o|  |     | | |  _V   |  |oldest memories|
|               |  e|n|o|  |Mind-| | | /  \  |  |to be forgotten|
|   memory      |  a|t|k|  |Boot | | |/Emo-\ |  |               |
|               |  d|s|s|  |_____| | |\tion/ |  |auditory output|
|   channel     |   | | | _________V | \__/  |  | and reentry   |
|               |   | | |/          \|  _____V_ |               |
|               |   | | |\ReJuvenate/| (EnThink)| "TEACH ME"    |
|   _______     |   | | | \________/ |  \_____/ | "SOMETHING"   |
|  /new    \    |   |_|_|      ______V__        |newest memories|
| / percept \   |  /     \    /         \       |to be recycled |
| \ engram  /---|-(  Psy  )  ( Sensorium )      |periodically by|
|  \_______/    |  \_____/    \_________/       |backwards shift|


2. Purpose of the ReJuvenate AI Mind-Module

The ReJuvenate module compensates for limited memory space by periodically forgetting the oldest memories and recycling other memories to make room for new memories in the potentially immortal AI Mind.


3. Algorithm of the ReJuvenate AI Mind-Module

The ReJuvenate module is meant to start cycling through memory at a time-point equal to the sum of the vault plus the arbitrary coda-value, such as 64 or 128 time-points, so that memories between the MindBoot vault-area and the end of the coda-space will be erased or "forgotten". ReJuvenate will move the surviving memories backwards by coda units into the area of the oldest memories being forgotten.

If the "vault" is at 851 and the "coda" is 128, the starting-point for back-pushing memories is 979 out of the 1024 cns. If the "vault" is at 851 and the "coda" is 64, the starting-point for back-pushing memories is 915 out of the 1024 cns.

The plan for ReJuvenate is that in proximity to "cns" the AI shall call ReJuvenate which will then calculate a starting-point before which post-vault memories will be forgotten and after which memories will be moved backwards by "coda" units of time. The time-value "t" can not be used as the starting point, because it is at the current time and not in the past.


4. Code of ReJuvenate() from ghost302.pl AI source code in Perl


sub ReJuvenate() {  # http://ai.neocities.org/ReJuvenate.html
  my $oubliette = ($vault + $coda);  # 2016apr19: to forget oldest memories.
  $rjc++;     # 2016apr18: increment rejuvenation counter.
  if ($rjc > 99999) { $rjc = 1 }  # 2016apr18: Reset for safety. 
  print "\nPlease wait as memories migrate in ReJuvenate cycle $rjc \n"; # 2016apr18
  for (my $i = $oubliette; $i<($t+2); ++$i) {  # 2016apr18: PERL_Black_Book 143
    $jrt = ($i - $coda);  # 2016apr19: the "junior" time is offset by $coda;
    #2016apr19: Starting at vault-size plus coda-size, move engrams back coda-spaces:
    my @k=split(',',$psy[$i]);  # 2016apr18: inspect @psy flag-panel
    if ($k[13] > $coda) { $k[13] = ($k[13] - $coda) }  # 2017jun08: keep $tkb valid.
    if ($k[14] > ($vault + $coda)) { $k[14] = ($k[14] - $coda) }  # 2017jun08
    $psy[$jrt]="$k[0],$k[1],$k[2],$k[3],$k[4],$k[5],$k[6],"
    . "$k[7],$k[8],$k[9],$k[10],$k[11],$k[12],$k[13],$k[14]";  # 2017-06-08
    $psy[$i] = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"; # 2017jun8: blank the original engram.
    my @aud=split(',',$ear[$i]);  # 2016apr18: expose @ear values during loop;
    $ear[$jrt] = "$aud[0],$aud[1],$aud[2]";  # 2016apr18: move data to $jrt;
    $ear[$i] = " ,0,0";  # 2016apr18: empty out the vacated rows.
  }  # 2016apr18: End of (for loop) moving through memory
  $t = $jrt;  # 2016apr19: re-start time $t back at the junior-time $jrt
  if ($t < $vault) { $t = $vault }  # 2016apr19: safeguard time $t
  for (my $j=$t; $j<$cns; ++$j) {  # 2016apr18: in cleared-out memory...
    $ear[$j] = " ,0,0";  # 2016apr18: empty out the vacated rows.
    $psy[$j] = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"; # 2017jun08: blank rows.
  }  # 2016apr18: end of the sweep from new $t to the end of $cns memory.
}  # 2016apr19: ReJuvenate() returns to the MainLoop.


5. Variables for the ReJuvenate AI Mind-Module

$cns -- (adjustable) size of "central nervous system" memory in the AI Mind.

$coda -- trailing segment of oldest memories recycled in ReJuvenate.

$jrt -- "junior time" for memories moved.

$rjc -- counter of rejuvenation cycles.

$vault -- size of MindBoot() sequence in time-points.


6. Troubleshooting and Debugging

6.1.a. Symptom: (Something goes wrong.)
6.1.b. Solution: (AI Mind Maintainer devises solution.)


7. Future Development

As the immortal AI Minds grow larger and larger with enormously capacious 64-bit or 128-bit memory channels, the ReJuvenate module will be called less and less frequently, because each AI will be less likely to run out of memory space. There will be a challenge for AI Mind Maintainers to rely less on the ReJuvenate mind-module and more on using "dynamic language" programming to change the AI codebase "on the fly", that is, dynamically and without interrupting the functioning and the memory-retention of an AI Mind. Whereas members of Homo sapiens, not being immortal, change their genetic DNA code only slowly during human evolution, AI Evolution in contrast may occur not only by the spawning of new offspring for an AI species, but also by means of dynamic changes in the AI codebase of an immortal AI that may have already existed for eons.

  • Roadmap to Artificial Intelligence and AI Immortality


    8. Resources

  • http://github.com/kernc/mindforth/blob/master/wiki/ReJuvenate.wiki

  • http://mind.sourceforge.net/rejuve.html

  • Artificial Intelligence in Ancient Latin (2020)


    9. AiTree of Mind-Modules for Natural Language Understanding

    See AI 101 AI 102 AI 103 year-long community college AI course curriculum.


    Paperback book on AI in ancient Latin

    Artificial Intelligence in Ancient Latin -- is available from Amazon in various countries:
    Australia - Canada - France - Germany - Italy - Japan - Netherlands - Singapore - Spain - United Kingdom - United States.
    Ada's Technical Books
    425 15th Avenue East
    Seattle, WA 98122
    USA Tel. 206-322-1058


    Website Counter