ReJuvenate module of the

First Working AGI Mind in JavaScript

MindForth for robots -- ghost.pl for webservers


Abstract
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 AI Mind.


1. Diagram of ReJuvenate Mind-Module


  /^^^^^^^^^^^\  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. Algorithm


3. Code of ReJuvenate() from ghost.pl First Working AGI 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],"    # 2017-06-08
    . "$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.


4. Troubleshooting and Robotic Psychosurgery

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


5. Variables

$rjc -- counter of rejuvenation cycles.


6. Resources


Please see

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

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


7. AiTree of First Working AGI Mind-Modules




For any questions about the ReJuvenate Mind Module, Join the Discussion at
http://agi.topicbox.com/groups/agi
for AI Mind Maintainers.
Share your ideas about ReJuvenate at the AI Wiki.
Edit http://theai.wiki/ReJuvenate.
Return to top; or to
javascript subreddit for AI Mind discussion;
Forth subreddit for MindForth discussion;
Perl subreddit for ghost.pl AI Mind Maintainers.