ReJuvenate module of the

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


3. Algorithm of the ReJuvenate 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 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

$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 Robotic Psychosurgery

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


7. Future Development


8. Resources

Please see

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

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


9. AiTree of Mind-Modules for Natural Language Understanding


Return to top; or to
Tiananmen Square IV VI
javascript subreddit for AI Mind discussion;
Forth subreddit for MindForth discussion;
Perl subreddit for ghost.pl AI Mind Maintainers.
http://old.reddit.com/r/ControlProblem -- NOT SOLVED.
http://en.wikipedia.org/wiki/Natural_language_understanding -- solved.
Iskusstvenny Intellekt Programming Journal for Artificial Intelligence in Russian Language.
Converting ancient Latin AI into modern Russian AI
http://ai.neocities.org/Dushka.html -- tutorial Russian AI;
If you have any questions about the First Working AGI, please Join the Discussion.
Joint Artificial Intelligence Center (JAIC) -- the AI Manhattan Project.
Subject to change without notice.
Many thanks to NeoCities.
http://neocities.org/blog
http://trollheaven.blogspot.com