All the news that's fit to assimilate
[ Home | Blogs | Events | Robots | Humans | Projects | About | Account ]Name: A.T. Murray
Member since: 2004-03-29 15:57:17
Last Login: 2009-06-09 21:18:07
Homepage: http://code.google.com/p/mindforth/wiki/UserManual
Notes:
( 24may09A.F -- modification of 20may09A.F Mind.Forth ) ( May be named "Mind.F" or any "Filename.F" you choose. ) ( Rename any Mind.F.txt as simply Mind.F for Win32Forth. ) ( http://www.winzip.com/aboutzip.htm tells about WinZip. ) ( Download and unzip W32FOR42_671.zip to run MindForth. ) ( Run the AI with Win32Forth by issuing three commands: ) ( win32for.exe [ENTER] ) ( fload Mind.f [ENTER] ) ( MainLoop [ENTER]. ) ( To halt the AI Mind, press the ESCAPE key at any time. ) DECIMAL ( use decimal numbers ) variable act 0 act ! ( activation level ) variable actbase ( audRecog discrimination activation base) variable adverbact 0 adverbact ! ( 29aug2008 adverb test ) variable aud ( auditory recall-tag for activating engrams) variable audjuste ( nounPhrase motjuste aud to SpeechAct ) variable audme ( tag to find "ME" in auditory memory ) variable audpsi ( de-globalizing the "psi" variable ) variable audrec ( 6may2009 replacing "psi" in AudRecog ) variable audstop ( flag to stop SpeechAct after one word ) variable back ( replaces "bulge" for "pre" in SpreadAct ) variable bday ( day of birth reveals oldest living AI Mind) variable beflag 0 beflag ! ( 23apr2009 for InStantiate ) variable beg 1 beg ! ( "beginning" flag for word engrams ) variable bhour ( hour of birth for user interface display ) variable bias 5 bias ! ( Parser; newConcept: expected POS ) variable bminute ( minute of birth: user interface display) variable bmonth ( month of birth: user interface display ) variable bsec ( second of birth: user interface display) variable byear ( MainLoop; TuringTest HCI -- year of birth) variable caller ( debug-identifier of calling module ) variable cns 1024 cns ! ( "central nervous system" size ) variable coda 128 coda ! ( memory recycled in Rejuvenate) variable cogpsi ( cognition psi source-node in SpreadAct ) variable conj ( OldConcept; ConJoin: conjunction ) variable ctu ( continuation-flag for "Aud" array phonemes ) variable decpsi1 ( decremend concept 1 for de-activation ) variable decpsi2 ( decremend concept 2 avoids repetition ) variable decpsi3 ( decremend concept 3 tracks recent psi ) variable detour ( abort-flag if knowledge is insufficient) variable dirobj ( indicates seeking for a direct object ) variable dopsi ( direct-object-psi to calculate "thotnum") variable edge 0 edge ! ( Rejuvenate: edge-of-thought flag) variable EEG 1 EEG ! ( safety measure if users neglect AI ) variable en6 ( EnVocab recall-vector "aud" in Rejuvenate ) variable enx ( holds concept-number in transfer to English) variable eot ( end-of-text for use in AudInput ) variable fex ( holds fiber-out concept up from Psi memory ) variable fin ( holds fiber-in concept for Psi array access) variable firstword ( So "DO" query triggers kbSearch ) variable fyi 0 fyi ! ( rotates through display modalities ) variable ghost 0 ghost ! ( to switch from "a" to "the" ) variable guspsi ( concept-tag attached to taste-memories ) variable gusrec ( for external recognition by GusRecog ) variable hipsi ( "high-psi" tag on wavecrest concept ) ( I = Index in loops; does not require a fetch "@" ) variable img ( visRecog: for future use as "image" ) variable inert 0 inert ! ( trigger of Ego resuscitation ) variable inflex1 ( inflection for use in SpeechAct ) variable instnum ( instantiation number for whatIs/Be ) variable IQ 6 IQ ! ( an invitation to code an IQ algorithm) variable jdex ( Testing a Reify subordinate loop index ) variable jrt ( ReJuvenate "junior time" for memories moved) variable jux 0 jux ! ( holds Psi # of a JUXtaposed word ) variable kbpsi ( 20jan2008 an interim knowledge-base psi ) variable kbquiz 0 kbquiz ! ( flag to call kbSearch ) variable kbtv 1 kbtv ! ( 3sep2008 KB-traversal trigger ) variable krt ( Knowledge Representation time "t" for later) variable lastpho ( 24may2009 to avoid extra "S" on verbs ) variable lastword 0 lastword ! ( for zeroing "seq" tags.) variable len ( length, for avoiding non-words in AudInput) variable lexact ( testing a lexical "act" for EnReify ) variable lopsi ( "low-psi" tag on just-crested concept ) variable match ( end-of-word flag for control ) variable memoire ( instead of "motjuste" in kbSearch ) variable midway 1 midway ! ( limit for searching backwards) variable monopsi ( 26jul2002 For use in audRecog module ) variable morphpsi ( for audRecog recognition of morphemes ) variable motjuste ( best word for inclusion in a thought ) variable nacpsi ( 9may2009 de-globalized psi for NounAct) variable nen 0 nen ! ( English lexical concept number ) variable newpsi ( for singular-nounstem assignments ) variable nlt 0 nlt ! ( not-later-than among time-points ) variable nounval 0 nounval ! ( from NounPhrase to MounAct ) variable nphrnum 0 nphrnum ! ( NounPhrase number ) variable nphrpos 0 nphrpos ! ( for testing in EnglishCog ) variable num 0 num ! ( number-flag for the psi array ) variable nwc ( new-word-count for noun-stem recog ) variable obstat ( Lets AudInput psi-damp a reentrant word.) variable oldact ( show the source of spreading activations) variable oldpos ( old part-of-speech for use with verbs ) variable oldpsi ( used in OldConcept to de-globalize "psi") variable olfpsi ( concept-tag attached to smells in memory) variable olfrec ( for external recognition by OlfRecog ) variable onset 0 onset ! ( of an auditory memory engram ) variable opt ( option, for flushing out a part of speech ) variable ordo 0 ordo ! ( from JSAI; AudInput word-order ) variable penultpho ( 17may2009 next-to-last phoneme ) variable pho ( phoneme of input/output & internal reentry ) variable pos ( old- & newConcept; enVocab: part-of-speech) variable pov ( point-of-view: #35 internal; *42 external ) variable pre ( previous concept associated with a concept ) variable precand ( inviolate "pre" candidate from JSAI ) variable predpos 0 predpos ! ( Predicate part of speech ) variable prepho ( 17may2009 previous phoneme ) variable preset 0 preset ! ( for setting InStantiate "pre") variable presyn ( synaptic deglobalized "pre" in SpreadAct) variable prevtag ( from JSAI; for use in InStantiate ) variable psi ( identifier of a psi concept in Psi mindcore) variable psi1 ( activation-level at each node of verb ) variable psi6 ( temporary tutorial enx for VerbPhrase use ) variable psi7 ( replacement for psi6 displaced by num ) variable psibase ( winning psibase with winning actbase ) variable questype ( oldConcept; Conjoin: "question-type" ) variable quiet 1 quiet ! ( status flag for auditory input ) variable recon 0 recon ! ( reconnaissance flag for Q & A ) variable redux ( For oldest concept to be revived. ) variable reject 0 reject ! ( used in sentence-generation ) variable retropsi ( for AudInput and Audmem noun-stems ) variable residuum 0 residuum ! ( activation after PsiDamp ) variable rjc 0 rjc ! ( rejuvenation counter for tracking ) variable rsvp 1000 rsvp ! ( user-response delay-counter) variable rv ( "recall-vector" for diagnostic display ) variable seq ( subSEQuent concept associated with another) variable seqsyn ( synaptic deglobalized "seq" in SpreadAct) variable singflag ( singularity flag for singular nouns ) variable spacegap ( to add gap of one space in SpeechAct ) variable spike ( 1aug2005: for potential use in SpreadAct) variable spt ( AudMem; AudInput: blank space time ) variable stemgap ( for avoiding false audRecog stems ) variable stempsi ( for singular noun-stem recognition ) variable subj ( flag to supercharge subject-nouns ) variable subjpsi ( For Predicate to correct beVerb choice) variable sublen ( length of audRecog subpsi word-stem ) variable subpsi ( for AudRecog of sub-component wordstems ) variable supsi ( subject-psi for calculating "thotnum" ) variable t 0 t ! ( time incremented during AudMem storage) variable t2s ( auditory text-to-speech index for SpeechAct) variable tacpsi ( concept-tag attached to tactile engrams) variable tacrec ( for external recognition by TacRecog ) variable thot1 ( 22jan2008 for detecting repetitions ) variable thot2 ( 22jan2008 for detecting repetitions ) variable thot3 ( 22jan2008 for detecting repetitions ) variable thotcyc ( for seeking repetition in a cycle ) variable thotnum ( a numeric concatenation of psi numbers) variable topic ( topic for a question to be asked ) variable topicnum ( grammatical number of question "topic") variable tov 1 tov ! ( time-of-voice for keeping track ) variable tsday ( for AudListen transcript-mode headers ) variable tshour ( AudListen ) variable tsminute ( AudListen ) variable tsmonth ( AudListen ) variable tssecond ( AudListen ) variable tsyear ( AudListen ) variable tult ( t penultimate, or time-minus-one ) variable txen ( Reify: time of transfer to English lexicon) variable ultpho ( 17may2009 ) variable unk ( "unknown" variable for general use ) variable upnext ( Flag lets new input de-crest previous. ) variable urpre ( original pre during call to other module ) variable urpsi ( original psi for use in psiDamp, etc. ) variable vault 202 vault ! ( vault size of EnBoot sequence) variable vbpsi ( verb-psi for calculating "thotnum" ) variable verbinc ( verb-increment to use in verbAct module) variable verbval ( transfer from VerbPhrase to VerbAct ) variable version 20090525 version ! ( for troubleshooting) variable vispsi ( concept-tag attached to images in memory) variable visrec ( for external recognition by VisRecog ) variable vpos ( verb part of speech for inflections ) variable whatflag 0 whatflag ! ( for InStantiate ) variable whereflag 0 whereflag ! ( for InStantiate ) variable whoflag 0 whoflag ! ( for InStantiate ) variable wordend ( for singular noun-stem assignments ) variable xthe 0 xthe ! ( Xfer NPhr motjuste to EnArticle ) variable yesorno 0 yesorno ! ( in conjunction w. KbSearch ) variable zone ( time-zone for "pre" and "seq" searches ): CHANNEL ( size num -< name >- ) CREATE ( Returns address of newly named channel. ) OVER ( #r #c -- #r #c #r ) , ( Stores number of rows from stack to array.) * CELLS ( Feeds product of columns * rows to ALLOT.) ALLOT ( Reserves given quantity of cells for array.) DOES> ( member; row col -- a-addr ) DUP @ ( row col pfa #rows ) ROT * ( row pfa col-index ) ROT + ( pfa index ) 1 + ( because first cell has the number of rows.) CELLS + ( from number of items to # of bytes in offset ) ;
cns @ 8 CHANNEL psi{ ( Mindcore concept array "psi" ) cns @ 7 CHANNEL en{ ( English lexicon array "en" ) cns @ 6 CHANNEL aud{ ( Auditory memory channel "aud" ) : PSI-CLEAR 1 t @ 1 + DO 0 I 1 psi{ ! -1 +LOOP ;
: TabulaRasa 0 unk ! 1 tov ! BEGIN cns @ 1 DO 0 I unk @ psi{ ! LOOP 1 unk +! unk @ 8 < WHILE REPEAT 0 unk ! 1 tov ! BEGIN cns @ 1 DO 0 I unk @ en{ ! LOOP 1 unk +! unk @ 6 < WHILE REPEAT 0 unk ! 1 tov ! BEGIN cns @ 1 DO 0 I unk @ aud{ ! LOOP 1 unk +! unk @ 6 < WHILE REPEAT cns @ 1 DO 32 I 0 aud{ ! LOOP ;
: VerbClear ( remove activation from all verbs ) midway @ t @ DO I 5 psi{ @ 8 = IF 0 I 1 psi{ ! THEN -1 +LOOP ;
: VerbClip ( lower activation on all verbs ) midway @ t @ DO I 5 psi{ @ 8 = IF I 1 psi{ @ 20 > IF 20 I 1 psi{ ! THEN THEN -1 +LOOP ;
: PsiDecay ( let conceptual activations dwindle ) fyi @ 2 > IF CR ." PsiDecay called to reduce all " ." conceptual activations." CR THEN midway @ t @ DO I 1 psi{ @ 1 - I 1 psi{ ! I 1 psi{ @ 0 < IF 0 I 1 psi{ ! THEN I 0 psi{ @ 59 = IF 0 I 1 psi{ ! THEN I 0 psi{ @ 54 = IF 0 I 1 psi{ ! THEN I 0 psi{ @ 7 = IF 0 I 1 psi{ ! THEN I 0 psi{ @ 57 = IF I 1 psi{ @ 8 < IF 1 I 1 psi{ ! THEN THEN I 0 psi{ @ 66 = IF I 1 psi{ @ 8 > IF 1 I 1 psi{ ! THEN THEN -1 +LOOP ;
: PsiDamp ( reduce activation of a concept ) 16 residuum ! fyi @ 2 > IF CR ." PsiDamp called for urpsi = " urpsi @ . ." by module ID #" caller @ . caller @ 42 = IF ." whatAuxSDo " THEN caller @ 51 = IF ." auxVerb " THEN caller @ 62 = IF ." verbPhrase " THEN caller @ 66 = IF ." NounPhrase " THEN caller @ 104 = IF ." AudInput " THEN caller @ 148 = IF ." Activate " THEN caller @ 3535 = IF ." AudInput " THEN 0 caller ! THEN midway @ t @ DO I 0 psi{ @ urpsi @ = IF residuum @ I 1 psi{ ! THEN -1 +LOOP 0 residuum ! PsiDecay ;
: EnDamp ( deactivate English lexicon concepts ) midway @ t @ DO 0 I 1 en{ ! -1 +LOOP ;
: AudDamp ( deactivate auditory engrams ) midway @ t @ DO 0 I 1 aud{ ! -1 +LOOP ;
: .psi ( show concepts in the Psi array ) CR ." Psi mindcore concepts" CR ." time: psi act num jux pre pos seq enx " t @ 1+ midway @ DO I 0 psi{ @ 0 > IF CR I . ." : " I 0 psi{ @ . ." " I 1 psi{ @ . ." " I 2 psi{ @ . ." " I 3 psi{ @ . ." " I 4 psi{ @ . ." " I 5 psi{ @ . ." " I 6 psi{ @ . ." " I 7 psi{ @ enx ! enx @ . enx @ 0 > IF ." to " I unk ! 0 aud ! midway @ unk @ DO I 0 en{ @ enx @ = IF I 6 en{ @ aud ! aud @ 0= NOT IF BEGIN aud @ 0 aud{ @ EMIT 1 aud +! aud @ 0 aud{ @ 32 = UNTIL ." " THEN 0 aud ! LEAVE ( One engrammed word is enough. ) THEN -1 +LOOP THEN THEN LOOP CR ." time: psi act num jux pre pos seq enx " 0 unk ! CR ." You may enter .psi or .en or .aud to view memory " ." engrams or " CR ." MainLoop [ENTER] to erase all memories " ." and restart the Mind." CR ;
: .en ( show vocabulary in the English lexicon array ) CR ." English lexical fibers" CR ." t nen act num fex pos fin aud:" t @ 1+ midway @ DO I 0 en{ @ unk ! unk @ 0 > IF ( display positive data ) CR I . unk @ . ." " I 1 en{ @ . ." " I 2 en{ @ . ." " I 3 en{ @ . ." " I 4 en{ @ . ." " I 5 en{ @ . ." " I 6 en{ @ aud ! aud @ . ." to " BEGIN aud @ 0 aud{ @ EMIT 1 aud +! aud @ 0 aud{ @ 32 = UNTIL ." " 0 aud ! THEN LOOP 0 unk ! CR ." t nen act num fex pos fin aud" CR CR ." You may enter .psi or .en or .aud to view memory " ." engrams or " CR ." MainLoop [ENTER] to erase all memories " ." and restart the Mind." CR ;
: .aud ( show engrams in the auditory memory array ) CR ." Auditory memory nodes" CR ." t pho act pov beg ctu audpsi" t @ 1+ 1 DO ( Show the entire Aud channel.) CR I . ." " I 2 aud{ @ 123 = IF ." { " THEN I 0 aud{ @ 33 < IF ." " ( show a blank ) ELSE I 0 aud{ @ EMIT ." " I 1 aud{ @ . ." " I 2 aud{ @ EMIT ." " I 3 aud{ @ . ." " I 4 aud{ @ . ." " I 5 aud{ @ . THEN I 2 aud{ @ 125 = IF ." } " THEN LOOP CR ." You may enter .psi or .en or .aud to view memory " ." engrams or " CR ." MainLoop [ENTER] to erase all memories " ." and restart the Mind." CR ;
: .echo ( show what the robot just said ) ( As on Usenet, user responds _below_ the AI output. ) fyi @ 2 = IF CR ." Tutorial mode is now in effect. " ." Enter input or wait for output." EEG @ 0 = IF CR ." Duplicate thought may have been detected." THEN THEN CR ." Robot: " t @ tov @ DO I 0 aud{ @ 0 = IF ." " ELSE I 2 aud{ @ 42 = NOT IF I 0 aud{ @ EMIT THEN THEN LOOP ;
: SpreadAct ( spreading activation ) fyi @ 3 = IF CR ." sprdAct: caller & seq = " caller @ . seq @ . THEN pre @ 0 > IF zone @ 7 - zone @ DO
I 0 psi{ @ presyn @ = IF 1 I 1 psi{ +! I 1 psi{ @ 0 < IF 0 I 1 psi{ ! THEN I 1 psi{ @ 63 > IF 63 I 1 psi{ ! THEN I zone @ 6 - > IF LEAVE THEN THEN -1 +LOOP THEN seqsyn @ 0 > IF fyi @ 3 = IF CR ." sprA pos. seq & spike = " seq @ . spike @ . CR THEN zone @ 9 + zone @ DO I 0 psi{ @ seqsyn @ = IF fyi @ 3 = IF CR ." SprA matching seq w. spike = " seq @ . spike @ . CR THEN fyi @ 1 > IF pov @ 35 = IF 0 psi7 ! fyi @ 3 = IF CR CR ." sprdAct: seq = " seq @ . CR CR THEN midway @ t @ DO I 0 psi{ @ cogpsi @ = IF I 7 psi{ @ psi7 ! LEAVE THEN -1 +LOOP midway @ t @ DO I 0 en{ @ psi7 @ = IF I 6 en{ @ rv ! LEAVE THEN -1 +LOOP 0 rv ! midway @ t @ DO I 0 psi{ @ seqsyn @ = IF I 7 psi{ @ psi7 ! LEAVE THEN -1 +LOOP midway @ t @ DO I 0 en{ @ psi7 @ = IF I 6 en{ @ rv ! LEAVE THEN -1 +LOOP rv @ 0 > IF BEGIN rv @ 0 aud{ @ EMIT 1 rv +! rv @ 0 aud{ @ 32 = UNTIL THEN 0 rv ! ." " THEN THEN fyi @ 2 > IF pov @ 35 = IF CR 0 psi7 ! midway @ t @ DO I 0 psi{ @ cogpsi @ = IF I 7 psi{ @ psi7 ! LEAVE THEN -1 +LOOP midway @ t @ DO I 0 en{ @ psi7 @ = IF I 6 en{ @ rv ! LEAVE THEN -1 +LOOP rv @ 0 > IF BEGIN rv @ 0 aud{ @ EMIT 1 rv +! rv @ 0 aud{ @ 32 = UNTIL THEN 0 rv ! ." #" cogpsi @ . ." act " oldact @ . ." at i " I . ." sprA spike " spike @ . ." to seq #" seq @ . midway @ t @ DO I 0 psi{ @ seqsyn @ = IF I 7 psi{ @ psi7 ! LEAVE THEN -1 +LOOP midway @ t @ DO I 0 en{ @ psi7 @ = IF I 6 en{ @ rv ! LEAVE THEN -1 +LOOP rv @ 0 > IF BEGIN rv @ 0 aud{ @ EMIT 1 rv +! rv @ 0 aud{ @ 32 = UNTIL THEN 0 rv ! CR ." at act " I 1 psi{ @ . ." yields " THEN THEN fyi @ 3 = IF ." sprA: spiking seq " spike @ . seq @ . THEN spike @ I 1 psi{ +! fyi @ 2 > IF pov @ 35 = IF I 1 psi{ @ . fyi @ 2 > IF ." and zone = " zone @ . THEN THEN THEN fyi @ 3 = IF I 1 psi{ @ . ." (lim = 63) for t=" I rv ! BEGIN -1 rv +! rv @ 3 aud{ @ 1 = UNTIL rv @ . BEGIN rv @ 0 aud{ @ EMIT 1 rv +! rv @ 0 aud{ @ 32 = UNTIL ." engram; in sprA spike = " spike @ . 0 rv ! THEN I 1 psi{ @ 63 > IF 63 I 1 psi{ ! THEN I zone @ 6 + > IF fyi @ 2 > IF CR ." executing LEAVE at zone = " zone @ . THEN LEAVE THEN THEN LOOP THEN ;
: NounAct ( re-activate all recent nodes of a concept ) fyi @ 2 > IF CR ." Calling nounAct (not in AI4U). psi = " psi @ . CR THEN nacpsi @ 0 > IF fyi @ 2 > IF CR ." nounAct calls SpreadAct to transfer " CR ." proportionate activation from each node of " CR ." concept #" psi @ . THEN midway @ t @ DO I 0 psi{ @ nacpsi @ = IF I 1 psi{ @ psi1 ! nounval @ 0 > IF nounval @ psi1 ! THEN psi1 @ 63 > IF 63 psi1 ! THEN psi1 @ I 1 psi{ ! I 0 psi{ @ 54 = IF 0 I 1 psi{ ! THEN 12 spike ! ( Aim for ample spikes.) I 4 psi{ @ presyn ! ( for use in SpreadAct ) I 6 psi{ @ seqsyn ! ( for use in SpreadAct ) I zone ! ( for use in SpreadAct ) I 1 psi{ @ 0 = IF 0 spike ! THEN I 1 psi{ @ 5 > IF 12 spike ! THEN I 1 psi{ @ 10 > IF 14 spike ! THEN I 1 psi{ @ 15 > IF 16 spike ! THEN I 1 psi{ @ 20 > IF 18 spike ! THEN I 1 psi{ @ 25 > IF 20 spike ! THEN I 1 psi{ @ 30 > IF 22 spike ! THEN I 1 psi{ @ 35 > IF 24 spike ! THEN I 1 psi{ @ 40 > IF 26 spike ! THEN I 1 psi{ @ 45 > IF 28 spike ! THEN I 1 psi{ @ 50 > IF 30 spike ! THEN I 1 psi{ @ 55 > IF 32 spike ! THEN I 1 psi{ @ 60 > IF 34 spike ! THEN nacpsi @ cogpsi ! I 1 psi{ @ oldact ! I 5 psi{ @ oldpos ! seqsyn @ 0 > IF 7865 caller ! SpreadAct ( for spreading activation ) 0 caller ! 0 presyn ! 0 seqsyn ! THEN precand @ pre ! 0 oldpos ! 0 cogpsi ! 0 oldact ! 0 pre ! THEN I 0 psi{ @ nacpsi @ = NOT IF I 5 psi{ @ DUP 5 = SWAP 7 = OR IF I 1 psi{ @ unk ! 0 unk ! I 1 psi{ @ < 0 IF 0 I 1 psi{ ! THEN THEN THEN -1 +LOOP THEN 0 spike ! ;
: VerbAct ( re-activate all recent nodes of a verb ) verbval @ 33 < IF 33 verbval @ - verbinc ! ELSE 0 verbinc ! THEN fyi @ 2 > IF CR ." Calling verbAct (not in AI4U). psi = " psi @ . CR THEN psi @ 0 > IF fyi @ 2 > IF CR ." verbAct calls SpreadAct to transfer " CR ." proportionate activation from each node of " CR ." concept #" psi @ . THEN psi @ cogpsi ! midway @ t @ DO I 0 psi{ @ psi @ = IF fyi @ 2 > IF I 1 psi{ @ 8 > IF ." +" THEN THEN I 1 psi{ @ psi1 ! psi1 @ I 1 psi{ ! I 0 psi{ @ 54 = IF 0 I 1 psi{ ! THEN I 1 psi{ @ 63 > IF 63 I 1 psi{ ! THEN I 4 psi{ @ presyn ! ( for use in SpreadAct ) I 6 psi{ @ seqsyn ! ( for use in SpreadAct ) I zone ! ( for use in SpreadAct ) I 1 psi{ @ 0 = IF 0 spike ! THEN I 1 psi{ @ 0 > IF 1 spike ! THEN I 1 psi{ @ 5 > IF 2 spike ! THEN I 1 psi{ @ 10 > IF 8 spike ! THEN I 1 psi{ @ 15 > IF 16 spike ! THEN I 1 psi{ @ 20 > IF 20 spike ! THEN I 1 psi{ @ 25 > IF 24 spike ! THEN I 1 psi{ @ 30 > IF 28 spike ! THEN I 1 psi{ @ 35 > IF 32 spike ! THEN I 1 psi{ @ 40 > IF 36 spike ! THEN I 1 psi{ @ 45 > IF 40 spike ! THEN I 1 psi{ @ 50 > IF 44 spike ! THEN I 1 psi{ @ 55 > IF 48 spike ! THEN I 1 psi{ @ 60 > IF 52 spike ! THEN psi @ cogpsi ! I 1 psi{ @ oldact ! I 5 psi{ @ oldpos ! seqsyn @ 0 > IF 8665 caller ! SpreadAct ( for spreading activation ) 0 caller ! 0 presyn ! 0 seqsyn ! THEN 0 oldpos ! 0 cogpsi ! 0 oldact ! 0 pre ! 0 seq ! THEN -1 +LOOP THEN 0 verbinc ! ;
: ReActivate ( re-activate recent nodes of a concept ) fyi @ 2 > IF CR ." Calling ReActivate. psi = " psi @ . CR THEN 0 spike ! psi @ 0 > IF fyi @ 2 > IF CR ." ReActivate calls SpreadAct to transfer " CR ." proportionate activation from each node of " CR ." concept #" psi @ . THEN midway @ t @ DO I 0 psi{ @ psi @ = IF 16 I 1 psi{ +! I 0 psi{ @ 54 = IF 0 I 1 psi{ ! THEN I 1 psi{ @ 63 > IF 63 I 1 psi{ ! THEN 1 spike ! I 1 psi{ @ 0 = IF 0 spike ! THEN I 1 psi{ @ 5 > IF 7 spike ! THEN I 1 psi{ @ 10 > IF 8 spike ! THEN I 1 psi{ @ 15 > IF 9 spike ! THEN I 1 psi{ @ 20 > IF 10 spike ! THEN I 1 psi{ @ 25 > IF 11 spike ! THEN I 1 psi{ @ 30 > IF 12 spike ! THEN I 1 psi{ @ 35 > IF 13 spike ! THEN I 1 psi{ @ 40 > IF 14 spike ! THEN I 1 psi{ @ 45 > IF 15 spike ! THEN I 1 psi{ @ 50 > IF 16 spike ! THEN I 1 psi{ @ 55 > IF 17 spike ! THEN I 1 psi{ @ 60 > IF 18 spike ! THEN psi @ cogpsi ! I 1 psi{ @ oldact ! I 5 psi{ @ oldpos ! I 4 psi{ @ presyn ! ( for use in SpreadAct ) I 6 psi{ @ seqsyn ! ( for use in SpreadAct ) I zone ! ( for use in SpreadAct ) 148 caller ! SpreadAct ( for spreading activation ) 0 oldpos ! 0 cogpsi ! 0 oldact ! 0 pre ! 0 presyn ! 0 seq ! 0 seqsyn ! 0 psi1 ! 1 spike ! THEN -1 +LOOP 0 caller ! 0 urpsi ! THEN ;
: InStantiate ( create a concept-fiber node ) precand @ 0 > IF precand @ pre ! THEN ordo @ 1 = IF 0 prevtag ! THEN lastword @ 1 = IF 0 seq ! 0 lastword ! THEN t @ 201 > IF whoflag @ 1 = IF psi @ 57 = IF 57 beflag ! THEN psi @ 66 = IF 66 beflag ! THEN psi @ 67 = IF 67 beflag ! THEN pos @ 5 = pos @ 7 = OR IF beflag @ seq ! 0 beflag ! 0 whoflag ! THEN THEN psi @ 55 = IF 1 whoflag ! 0 act ! THEN singflag @ 1 = IF pos @ 5 = IF 1 num ! 0 singflag ! THEN THEN psi @ 1 = IF 1 singflag ! 0 act ! THEN THEN prevtag @ pre ! ( concept fiber psi ) psi @ t @ 0 psi{ ! ( Set "act" activation level. ) act @ t @ 1 psi{ +! ( Set "num" number flag ) num @ t @ 2 psi{ ! ( Store JUXtaposition tags. ) jux @ t @ 3 psi{ ! ( Store PREvious associand. ) pre @ t @ 4 psi{ ! ( Store functional pos code. ) pos @ t @ 5 psi{ ! ( Store the subSEQuent tag. ) seq @ t @ 6 psi{ ! ( Store the EN-transfer tag. ) enx @ t @ 7 psi{ ! num @ instnum ! 0 num ! 0 preset ! pos @ 5 = pos @ 7 = OR IF psi @ prevtag ! THEN ordo @ 1 > IF psi @ seq ! vault @ t @ 2 - DO I 1 psi{ @ 0 > IF seq @ I 6 psi{ ! LEAVE THEN -1 +LOOP THEN 0 seq ! ;
: EnVocab ( English Vocabulary node creation ) ( Number "nen" of English ) nen @ t @ 0 en{ ! ( Do not store the activation level; it is a transient.) ( Store "num" number tag. ) num @ t @ 2 en{ ! ( Store mindcore EXit tag. ) fex @ t @ 3 en{ ! ( Store part of speech "pos".) pos @ t @ 4 en{ ! ( Store mindcore IN tag. ) fin @ t @ 5 en{ ! ( Store the auditory "aud" tag. ) aud @ t @ 6 en{ ! ;
: EnParser ( determine the part of speech ) 5 bias ! 36 act ! INSTANTIATE pos @ 5 = IF 8 bias ! THEN pos @ 7 = IF 8 bias ! THEN pos @ 8 = IF 5 bias ! THEN psi @ jux ! ;
: EnReify ( express abstract concepts as real words ) 0 act ! midway @ t @ DO I 1 psi{ @ 0 > IF I 1 psi{ @ lexact ! I 2 psi{ @ num ! I 7 psi{ @ enx ! I 0 en{ @ enx @ = IF lexact @ I 1 en{ ! num @ I 2 en{ ! 0 lexact ! THEN THEN 0 enx ! 0 act ! 0 lexact ! -1 +LOOP 0 act ! ;
: KbSearch ( knowledge base search ) ordo @ 2 = IF NounAct EnReify THEN ordo @ 3 = IF 0 act ! midway @ t @ DO I 4 en{ @ 8 = IF I 1 en{ @ act @ > IF ( if en1 is higher ) I 0 en{ @ memoire ! ( store psi-tag of word ) I 1 en{ @ act ! ( to test for a higher en1 ) THEN THEN -1 +LOOP yesorno @ 0 > IF memoire @ psi @ = IF 1 yesorno +! ELSE 0 yesorno ! THEN THEN verbAct EnReify THEN ordo @ 4 = IF 0 act ! 0 memoire ! midway @ t @ DO I 4 en{ @ DUP 5 = SWAP 7 = OR IF I 1 en{ @ act @ > IF ( if en1 is higher ) I 0 en{ @ memoire ! ( store psi-tag of word ) I 1 en{ @ act ! ( to test for a higher en1 ) THEN THEN -1 +LOOP yesorno @ 0 > IF memoire @ psi @ = IF 1 yesorno +! ELSE 0 yesorno ! THEN THEN THEN 0 kbquiz ! ordo @ 4 = IF 0 ordo ! THEN ;
: OldConcept ( recognize a known word ) 24 act ! midway @ t @ DO I 0 en{ @ oldpsi @ = IF I 2 en{ @ 0 > IF I 2 en{ @ num ! THEN I 3 en{ @ 0 > IF I 3 en{ @ fex ! THEN I 4 en{ @ 0 > IF I 4 en{ @ pos ! THEN I 5 en{ @ 0 > IF I 5 en{ @ fin ! THEN LEAVE THEN -1 +LOOP ( oldpsi found by audRecog ) oldpsi @ t @ 0 en{ ! ( Store zero activation. ) 0 t @ 1 en{ ! ( Store "num" number tag. ) num @ t @ 2 en{ ! ( Store mindcore EXit tag. ) fex @ t @ 3 en{ ! ( Store part of speech "pos".) pos @ t @ 4 en{ ! ( Store mindcore IN tag. ) fin @ t @ 5 en{ ! ( Store the auditory "aud" tag. ) aud @ t @ 6 en{ ! pov @ 35 = IF fex @ oldpsi ! THEN pov @ 42 = IF fin @ oldpsi ! THEN oldpsi @ enx ! oldpsi @ 54 = IF 8 act ! THEN oldpsi @ 55 = IF 8 act ! THEN ordo @ 1 = IF oldpsi @ 59 = IF 1 kbquiz ! THEN THEN oldpsi @ 59 = IF 8 act ! THEN oldpsi @ 7 = IF 1 act ! THEN oldpsi @ psi ! EnParser 0 pos ! fyi @ 2 > IF CR ." from OldConcept " THEN pov @ 42 = IF pre @ urpre ! ReActivate urpre @ pre ! THEN 0 act ! pov @ 35 = IF 1 match ! THEN kbquiz @ 0 > IF 1 yesorno ! KbSearch THEN yesorno @ 0 > IF KbSearch THEN ;
: NewConcept ( machine learning of new concepts ) 0 newpsi ! 1 nen +! 1 nwc +! nen @ IQ ! nen @ newpsi ! nen @ stempsi ! nen @ psi ! nen @ fex ! nen @ fin ! bias @ pos ! enVocab ( to create an ENglish vocabulary node ) 0 fex ! 0 fin ! nen @ enx ! EnParser 0 pos ! 0 act ! ;
: AudRecog ( auditory recognition ) 0 audrec ! 0 psi ! 8 act ! 0 actbase ! midway @ spt @ DO I 0 aud{ @ pho @ = IF I 1 aud{ @ 0 = IF I 3 aud{ @ 1 = IF I 4 aud{ @ 1 = IF 8 I 1+ 1 aud{ ! 0 audrec ! ELSE len @ 1 = IF I 5 aud{ @ monopsi ! THEN THEN THEN THEN I 1 aud{ @ 0 > IF 0 audrec ! I 4 aud{ @ 1 = IF 2 act +! 0 audrec ! act @ I 1+ 1 aud{ ! THEN I 4 aud{ @ 0 = IF len @ 2 = IF I 1 aud{ @ 0 > IF I 5 aud{ @ psibase ! THEN THEN THEN I 1 aud{ @ 8 > IF I 4 aud{ @ 0 = IF I 1 aud{ @ actbase @ > IF I 5 aud{ @ audrec ! I 5 aud{ @ subpsi ! len @ sublen ! I 5 aud{ @ psibase ! I 1 aud{ @ actbase ! THEN ELSE 0 audrec ! monopsi @ 0 > IF monopsi @ audrec ! 0 monopsi ! THEN THEN THEN THEN THEN -1 +LOOP 0 act ! 0 actbase ! psibase @ 0 > IF psibase @ audrec ! THEN audrec @ 0 = IF monopsi @ 0 > IF len @ 2 < IF monopsi @ audrec ! THEN 0 monopsi ! audrec @ 0 = IF psibase @ 0 > IF psibase @ audrec ! THEN THEN THEN THEN audrec @ 0 = IF morphpsi @ audrec ! sublen @ 0 > IF len @ sublen @ - stemgap ! THEN stemgap @ 0 < IF 0 stemgap ! THEN stemgap @ 1 > IF 0 subpsi ! THEN stemgap @ 1 > IF 0 morphpsi ! THEN stemgap @ 1 > IF 0 audrec ! THEN THEN subpsi @ morphpsi ! 0 psibase ! 0 subpsi ! audrec @ 0 > IF stemgap @ 2 > IF 0 audrec ! THEN pho @ 83 = IF 2 num ! THEN THEN audrec @ audpsi ! ;
: AudMem ( auditory memory channel ) t @ vault @ > IF pho @ 32 > IF AudRecog THEN ( ASCII 32 = SPACE-bar ) THEN t @ 1- 0 aud{ @ 0 = IF 1 beg ! THEN t @ 1- 0 aud{ @ 32 = IF 1 beg ! THEN pho @ t @ 0 aud{ ! pov @ t @ 2 aud{ ! beg @ t @ 3 aud{ ! ctu @ t @ 4 aud{ ! ctu @ 0 = IF audpsi @ 0 > IF audpsi @ t @ 5 aud{ ! THEN 0 audpsi ! THEN pov @ 42 = IF pho @ 83 = IF 0 stempsi ! wordend @ 1 = IF 0 t @ 1- 4 aud{ ! THEN 0 newpsi ! THEN THEN pho @ 32 = IF t @ spt ! THEN ;
: AudListen ( preparation for AudInput ) rsvp @ 1 DO KEY? IF KEY pho ! 0 quiet ! pho @ 8 = IF 7 EMIT THEN pho @ 9 = IF 200 rsvp ! pho @ 13 = IF 1 lastword ! THEN fyi @ 0 = IF CR CR TIME&DATE tsyear ! tsmonth ! tsday ! tshour ! tsminute ! tssecond ! ." Transcript of AI Mind interview at " tshour @ . tsminute @ . tssecond @ . ." o'clock on " tsday @ . tsmonth @ 1 = IF ." January " THEN tsmonth @ 2 = IF ." February " THEN tsmonth @ 3 = IF ." March " THEN tsmonth @ 4 = IF ." April " THEN tsmonth @ 5 = IF ." May " THEN tsmonth @ 6 = IF ." June " THEN tsmonth @ 7 = IF ." July " THEN tsmonth @ 8 = IF ." August " THEN tsmonth @ 9 = IF ." September " THEN tsmonth @ 10 = IF ." October " THEN tsmonth @ 11 = IF ." November " THEN tsmonth @ 12 = IF ." December " THEN tsyear @ . 8 EMIT 46 EMIT CR THEN 1 fyi +! fyi @ 3 > IF 0 fyi ! THEN fyi @ 0 = IF CR ." Normal display mode. Tab 1 = " ." Transcript; 2 = Tutorial; 3 = Diagnostic." CR THEN fyi @ 2 = IF CR ." Tutorial mode reveals the internal " ." thinking of the AI Mind." CR CR THEN fyi @ 3 = IF CR ." Diagnostic messages - ignore during input " ." until you press ENTER." CR THEN 0 pho ! THEN pho @ 27 = IF 0 nounval ! 0 lopsi ! 0 hipsi ! CR CR ." User Command: halt" 0 pho ! 0 rjc ! 0 fyi ! CR ." You may enter .psi or .en or .aud to view " ." memory engrams, or " CR ." MainLoop [ENTER] " ." to erase memories and restart the Mind." CR ." Type 'bye' to quit Forth, EXIT to quit DOS." CR 0 audpsi ! 0 newpsi ! 0 oldpsi ! 0 stempsi ! QUIT THEN pho @ 0 > IF pho @ EMIT THEN pho @ DUP 96 > IF DUP 123 < IF 32 - THEN THEN pho ! LEAVE ELSE ." " THEN 8 EMIT LOOP ;
: AudInput ( accept auditory input ) 0 match ! 0 upnext ! 0 urpsi ! t @ nlt ! pov @ 42 = IF fyi @ 2 = IF ." AudInput calls AudListen " ." (Tab key will slow the AI down)." CR THEN t @ spt ! t @ 8 > IF .echo THEN ( show output of AI ) CR ." Human: " THEN 140 0 DO ( Accept a tweet of 140 characters from Twitter) pov @ 35 = IF 1 upnext +! upnext @ 1 = IF obstat @ 0 = IF kbpsi @ lopsi ! 0 kbpsi ! lopsi @ urpsi ! 3535 caller ! pho @ 64 > IF PsiDamp THEN hipsi @ lopsi ! 0 caller ! 0 urpsi ! 1 obstat ! THEN THEN EEG @ 0 = IF psi @ 0 > IF psi @ redux ! fyi @ 2 = IF 7 EMIT CR ." Resurrecting oldest concept #" redux @ . CR THEN THEN THEN THEN pov @ 42 = IF AudListen pho @ 0 > IF 0 kbtv ! 1 upnext +! upnext @ 1 = IF VerbClip hipsi @ urpsi ! 104 caller ! PsiDamp hipsi @ lopsi ! 0 caller ! 0 urpsi ! THEN 300 rsvp ! THEN I 138 = IF rsvp @ 250 > IF 60 rsvp ! THEN THEN I 139 = IF pho @ 0 = IF rsvp @ 1 - rsvp ! rsvp @ 2 < IF 2 rsvp ! THEN ELSE 32 rsvp ! THEN THEN pho @ 32 = pho @ 13 = OR IF pho @ 13 = IF 10 EMIT THEN prepho @ 83 = IF 0 t @ 1 - 4 aud{ ! 0 prepho ! THEN THEN THEN pho @ 0 > IF 1 t +! THEN pho @ 13 = IF 1 quiet ! 1 beg ! 13 eot ! 32 pho ! 10 EMIT CR 1 lastword ! THEN pho @ 27 = IF CR ." AudInput: halt" 0 pho ! 0 fyi ! 0 nounval ! CR ." You may enter .psi .en .aud to view memory " ." engrams, or " CR ." MainLoop [ENTER] to erase " ." memories and run the AI again." 0 lopsi ! 0 hipsi ! 0 audpsi ! 0 newpsi ! 0 oldpsi ! 0 stempsi ! QUIT THEN pho @ 32 = IF prepho @ penultpho ! 1 ordo +! audpsi @ urpsi ! 0 upnext ! t @ spt ! t @ 1 - tult ! 0 tult @ 4 aud{ ! audpsi @ 0 > IF 0 sublen ! onset @ aud ! 0 onset ! audpsi @ tult @ 5 aud{ ! pov @ 42 = IF tult @ 0 aud{ @ 83 = IF tult @ 1- 5 aud{ @ audpsi @ = NOT IF 0 tult @ 1- 4 aud{ ! THEN audpsi @ tult @ 1- 5 aud{ ! THEN THEN audpsi @ hipsi ! audpsi @ oldpsi ! OldConcept eot @ 13 = IF 35 pov ! THEN 0 psi ! 0 audpsi ! 0 aud ! ELSE len @ 0 > IF onset @ aud ! hipsi @ lopsi ! 1 wordend ! NewConcept psi @ hipsi ! nen @ tult @ 5 aud{ ! nen @ tult @ 1- 5 aud{ ! nen @ retropsi ! THEN THEN AudDamp 0 len ! 0 aud ! eot @ 13 = IF 5 bias ! THEN 0 psi ! THEN 1 beg ! 1 ctu ! spt @ 1 + onset ! t @ onset @ = IF 1 beg ! ELSE 0 beg ! THEN pho @ 32 > IF 1 len +! AudMem THEN eot @ 13 = IF 5 bias ! 1 quiet ! THEN eot @ 0 > IF eot @ 14 = IF 1 quiet ! 0 eot ! 0 pho ! LEAVE THEN 14 eot ! THEN pho @ 0 > IF pho @ prepho ! THEN 0 pho ! LOOP hipsi @ kbpsi ! 0 newpsi ! 0 wordend ! ;
: SensoryInput ( sensory input channels ) ( SMELL -- normal sensory stub for later implementation ) ( VISION -- normal sensory stub for seed AI expansion ) ( TOUCH -- normal haptics stub for cybernetic organisms ) ( TASTE -- normal sensory stub for cyborg alife ) ( SYNAESTHESIA -- an option in a multisensory AI ) fyi @ 2 = IF ." SensoryInput calls AudInput." CR THEN AudInput ( for entry or reentry of phonemic ASCII ) ( COMPASS -- exotic sensory stub for use in robots ) ( GEIGER -- exotic: Geiger counter ) ( GPS -- exotic: Global Positioning System ) ( INFRARED -- exotic ) ( RADAR -- exotic: RAdio Detection And Ranging ) ( SONAR -- exotic: SOund Navigation And Ranging ) ( VSA -- exotic: Voice Stress Analyzer lie detector ) ( Wi-Fi -- exotic: 802.11 wireless fidelity ) ;
: EnBoot ( English bootstrap of initial concepts ) 0 act ! 0 jux ! 35 pov ! 0 t ! t @ spt ! ." clearing memory" CR ." There is no warranty for what this software does." 1 t ! 89 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 2 t ! 69 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 3 t ! 83 pho ! 0 beg ! 0 ctu ! 32 audpsi ! AudMem 32 nen ! 32 fex ! 4 pos ! 32 fin ! 1 aud ! EnVocab 32 psi ! 0 num ! 0 pre ! 0 seq ! 32 enx ! InStantiate 5 t ! 73 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 6 t ! 70 pho ! 0 beg ! 0 ctu ! 20 audpsi ! AudMem 20 nen ! 20 fex ! 3 pos ! 20 fin ! 5 aud ! EnVocab 20 psi ! 0 num ! 0 pre ! 0 seq ! 20 enx ! InStantiate 8 t ! 84 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 9 t ! 72 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 10 t ! 69 pho ! 0 beg ! 0 ctu ! 7 audpsi ! AudMem 7 nen ! 7 fex ! 1 pos ! 7 fin ! 8 aud ! EnVocab 7 psi ! 0 num ! 0 pre ! 0 seq ! 7 enx ! InStantiate 12 t ! 84 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 13 t ! 82 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 14 t ! 85 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 15 t ! 84 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 16 t ! 72 pho ! 0 beg ! 0 ctu ! 68 audpsi ! AudMem 68 nen ! 68 fex ! 5 pos ! 68 fin ! 12 aud ! EnVocab 68 psi ! 1 num ! 0 pre ! 66 seq ! 68 enx ! InStantiate 18 t ! 73 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 19 t ! 83 pho ! 0 beg ! 0 ctu ! 66 audpsi ! AudMem 66 nen ! 66 fex ! 8 pos ! 66 fin ! 18 aud ! EnVocab 66 psi ! 1 num ! 68 pre ! 0 seq ! 66 enx ! InStantiate 21 t ! 84 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 22 t ! 72 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 23 t ! 65 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 24 t ! 84 pho ! 0 beg ! 0 ctu ! 22 audpsi ! AudMem 22 nen ! 22 fex ! 3 pos ! 22 fin ! 21 aud ! EnVocab 22 psi ! 0 num ! 0 pre ! 0 seq ! 22 enx ! InStantiate 26 t ! 65 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 27 t ! 76 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 28 t ! 76 pho ! 0 beg ! 0 ctu ! 2 audpsi ! AudMem 2 nen ! 2 fex ! 1 pos ! 2 fin ! 26 aud ! EnVocab 2 psi ! 0 num ! 0 pre ! 0 seq ! 2 enx ! InStantiate 30 t ! 82 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 31 t ! 79 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 32 t ! 66 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 33 t ! 79 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 34 t ! 84 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 35 t ! 83 pho ! 0 beg ! 0 ctu ! 39 audpsi ! AudMem 39 nen ! 39 fex ! 5 pos ! 39 fin ! 30 aud ! EnVocab 39 psi ! 2 num ! 0 pre ! 0 seq ! 39 enx ! InStantiate 37 t ! 65 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 38 t ! 82 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 39 t ! 69 pho ! 0 beg ! 0 ctu ! 67 audpsi ! AudMem 67 nen ! 67 fex ! 8 pos ! 67 fin ! 37 aud ! EnVocab 67 psi ! 0 num ! 39 pre ! 38 seq ! 67 enx ! InStantiate 41 t ! 80 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 42 t ! 69 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 43 t ! 82 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 44 t ! 83 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 45 t ! 79 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 46 t ! 78 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 47 t ! 83 pho ! 0 beg ! 0 ctu ! 38 audpsi ! AudMem 38 nen ! 38 fex ! 5 pos ! 38 fin ! 41 aud ! EnVocab 38 psi ! 2 num ! 0 pre ! 0 seq ! 38 enx ! InStantiate 49 t ! 66 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 50 t ! 69 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 51 t ! 67 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 52 t ! 65 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 53 t ! 85 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 54 t ! 83 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 55 t ! 69 pho ! 0 beg ! 0 ctu ! 18 audpsi ! AudMem 18 nen ! 18 fex ! 3 pos ! 18 fin ! 49 aud ! EnVocab 18 psi ! 0 num ! 0 pre ! 0 seq ! 18 enx ! InStantiate 57 t ! 87 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 58 t ! 69 pho ! 0 beg ! 0 ctu ! 53 audpsi ! AudMem 53 nen ! 53 fex ! 7 pos ! 56 fin ! 57 aud ! EnVocab 53 psi ! 2 num ! 0 pre ! 0 seq ! 53 enx ! InStantiate 60 t ! 84 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 61 t ! 72 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 62 t ! 73 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 63 t ! 78 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 64 t ! 75 pho ! 0 beg ! 0 ctu ! 63 audpsi ! AudMem 63 nen ! 63 fex ! 8 pos ! 63 fin ! 60 aud ! EnVocab 63 psi ! 0 num ! 0 pre ! 0 seq ! 63 enx ! InStantiate 66 t ! 84 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 67 t ! 72 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 68 t ! 69 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 69 t ! 78 pho ! 0 beg ! 0 ctu ! 13 audpsi ! AudMem 13 nen ! 13 fex ! 2 pos ! 13 fin ! 66 aud ! EnVocab 13 psi ! 0 num ! 0 pre ! 0 seq ! 13 enx ! InStantiate 71 t ! 78 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 72 t ! 79 pho ! 0 beg ! 0 ctu ! 27 audpsi ! AudMem 27 nen ! 27 fex ! 4 pos ! 27 fin ! 71 aud ! EnVocab 27 psi ! 0 num ! 0 pre ! 0 seq ! 27 enx ! InStantiate 74 t ! 89 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 75 t ! 79 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 76 t ! 85 pho ! 0 beg ! 0 ctu ! 56 audpsi ! AudMem 56 nen ! 56 fex ! 7 pos ! 50 fin ! 74 aud ! EnVocab 56 psi ! 0 num ! 0 pre ! 35 seq ! 56 enx ! InStantiate 78 t ! 65 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 79 t ! 78 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 80 t ! 68 pho ! 0 beg ! 0 ctu ! 17 audpsi ! AudMem 17 nen ! 17 fex ! 3 pos ! 17 fin ! 78 aud ! EnVocab 17 psi ! 0 num ! 0 pre ! 0 seq ! 17 enx ! InStantiate 82 t ! 73 pho ! 1 beg ! 0 ctu ! 50 audpsi ! AudMem 50 nen ! 50 fex ! 7 pos ! 56 fin ! 82 aud ! EnVocab 50 psi ! 1 num ! 0 pre 0 seq ! 50 enx ! InStantiate 84 t ! 68 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 85 t ! 79 pho ! 0 beg ! 0 ctu ! 59 audpsi ! AudMem 59 nen ! 59 fex ! 8 pos ! 59 fin ! 84 aud ! EnVocab 59 psi ! 0 num ! 0 pre ! 0 seq ! 59 enx ! InStantiate 87 t ! 78 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 88 t ! 79 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 89 t ! 84 pho ! 0 beg ! 0 ctu ! 12 audpsi ! AudMem 12 nen ! 12 fex ! 2 pos ! 12 fin ! 87 aud ! EnVocab 12 psi ! 0 num ! 0 pre ! 0 seq ! 12 enx ! InStantiate 91 t ! 75 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 92 t ! 78 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 93 t ! 79 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 94 t ! 87 pho ! 0 beg ! 0 ctu ! 61 audpsi ! AudMem 61 nen ! 61 fex ! 8 pos ! 61 fin ! 91 aud ! EnVocab 61 psi ! 0 num ! 50 pre ! 0 seq ! 61 enx ! InStantiate 96 t ! 87 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 97 t ! 72 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 98 t ! 89 pho ! 0 beg ! 0 ctu ! 16 audpsi ! AudMem 16 nen ! 16 fex ! 2 pos ! 16 fin ! 96 aud ! EnVocab 16 psi ! 0 num ! 0 pre ! 0 seq ! 16 enx ! InStantiate 100 t ! 83 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 101 t ! 79 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 102 t ! 77 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 103 t ! 69 pho ! 0 beg ! 0 ctu ! 69 audpsi ! AudMem 69 nen ! 69 fex ! 1 pos ! 69 fin ! 100 aud ! EnVocab 69 psi ! 0 num ! 0 pre ! 0 seq ! 69 enx ! InStantiate 105 t ! 80 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 106 t ! 69 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 107 t ! 79 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 108 t ! 80 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 109 t ! 76 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 110 t ! 69 pho ! 0 beg ! 0 ctu ! 37 audpsi ! AudMem 37 nen ! 37 fex ! 5 pos ! 37 fin ! 105 aud ! EnVocab 37 psi ! 2 num ! 0 pre ! 70 seq ! 37 enx ! InStantiate 112 t ! 72 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 113 t ! 65 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 114 t ! 86 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 115 t ! 69 pho ! 0 beg ! 0 ctu ! 70 audpsi ! AudMem 70 nen ! 70 fex ! 8 pos ! 70 fin ! 112 aud ! EnVocab 70 psi ! 0 num ! 37 pre ! 71 seq ! 70 enx ! InStantiate 117 t ! 65 pho ! 1 beg ! 0 ctu ! 1 audpsi ! AudMem 1 nen ! 1 fex ! 1 pos ! 1 fin ! 117 aud ! EnVocab 1 psi ! 1 num ! 0 pre ! 0 seq ! 1 enx ! InStantiate 119 t ! 70 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 120 t ! 69 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 121 t ! 65 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 122 t ! 82 pho ! 0 beg ! 0 ctu ! 71 audpsi ! AudMem 71 nen ! 71 fex ! 5 pos ! 71 fin ! 119 aud ! EnVocab 71 psi ! 1 num ! 0 pre ! 0 seq ! 71 enx ! InStantiate 124 t ! 79 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 125 t ! 70 pho ! 0 beg ! 0 ctu ! 45 audpsi ! AudMem 45 nen ! 45 fex ! 6 pos ! 45 fin ! 124 aud ! EnVocab 45 psi ! 0 num ! 0 pre ! 0 seq ! 45 enx ! InStantiate 127 t ! 87 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 128 t ! 72 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 129 t ! 79 pho ! 0 beg ! 0 ctu ! 55 audpsi ! AudMem 55 nen ! 55 fex ! 5 pos ! 55 fin ! 127 aud ! EnVocab 55 psi ! 0 num ! 0 pre ! 0 seq ! 55 enx ! InStantiate 131 t ! 73 pho ! 1 beg ! 0 ctu ! 50 audpsi ! AudMem 50 nen ! 50 fex ! 7 pos ! 56 fin ! 131 aud ! EnVocab 50 psi ! 1 num ! 0 pre ! 57 seq ! 50 enx ! InStantiate 133 t ! 65 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 134 t ! 77 pho ! 0 beg ! 0 ctu ! 57 audpsi ! AudMem 57 nen ! 57 fex ! 8 pos ! 57 fin ! 133 aud ! EnVocab 57 psi ! 0 num ! 0 pre ! 54 seq ! 57 enx ! InStantiate 136 t ! 79 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 137 t ! 82 pho ! 0 beg ! 0 ctu ! 21 audpsi ! AudMem 21 nen ! 21 fex ! 3 pos ! 21 fin ! 136 aud ! EnVocab 21 psi ! 0 num ! 0 pre ! 0 seq ! 21 enx ! InStantiate 139 t ! 87 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 140 t ! 72 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 141 t ! 65 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 142 t ! 84 pho ! 0 beg ! 0 ctu ! 54 audpsi ! AudMem 54 nen ! 54 fex ! 5 pos ! 54 fin ! 139 aud ! EnVocab 54 psi ! 0 num ! 0 pre ! 0 seq ! 54 enx ! InStantiate 144 t ! 84 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 145 t ! 72 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 146 t ! 69 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 147 t ! 89 pho ! 0 beg ! 0 ctu ! 52 audpsi ! AudMem 52 nen ! 52 fex ! 7 pos ! 52 fin ! 144 aud ! EnVocab 52 psi ! 2 num ! 0 pre ! 0 seq ! 52 enx ! InStantiate 149 t ! 83 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 150 t ! 69 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 151 t ! 69 pho ! 0 beg ! 0 ctu ! 62 audpsi ! AudMem 62 nen ! 62 fex ! 8 pos ! 62 fin ! 149 aud ! EnVocab 62 psi ! 0 num ! 52 pre ! 0 seq ! 62 enx ! InStantiate 153 t ! 73 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 154 t ! 78 pho ! 0 beg ! 0 ctu ! 44 audpsi ! AudMem 44 nen ! 44 fex ! 6 pos ! 44 fin ! 153 aud ! EnVocab 44 psi ! 0 num ! 0 pre ! 0 seq ! 44 enx ! InStantiate 156 t ! 77 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 157 t ! 69 pho ! 0 beg ! 0 ctu ! 65 audpsi ! AudMem 65 nen ! 65 fex ! 7 pos ! 56 fin ! 156 aud ! EnVocab 65 psi ! 1 num ! 0 pre ! 0 seq ! 65 enx ! InStantiate 159 t ! 75 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 160 t ! 73 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 161 t ! 68 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 162 t ! 83 pho ! 0 beg ! 0 ctu ! 72 audpsi ! AudMem 72 nen ! 72 fex ! 5 pos ! 72 fin ! 159 aud ! EnVocab 72 psi ! 2 num ! 0 pre ! 73 seq ! 72 enx ! InStantiate 164 t ! 77 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 165 t ! 65 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 166 t ! 75 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 167 t ! 69 pho ! 0 beg ! 0 ctu ! 73 audpsi ! AudMem 73 nen ! 73 fex ! 8 pos ! 73 fin ! 164 aud ! EnVocab 73 psi ! 0 num ! 72 pre ! 39 seq ! 73 enx ! InStantiate 169 t ! 82 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 170 t ! 79 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 171 t ! 66 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 172 t ! 79 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 173 t ! 84 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 174 t ! 83 pho ! 0 beg ! 0 ctu ! 39 audpsi ! AudMem 39 nen ! 39 fex ! 5 pos ! 39 fin ! 169 aud ! EnVocab 39 psi ! 2 num ! 73 pre ! 0 seq ! 39 enx ! InStantiate 176 t ! 82 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 177 t ! 79 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 178 t ! 66 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 179 t ! 79 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 180 t ! 84 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 181 t ! 83 pho ! 0 beg ! 0 ctu ! 39 audpsi ! AudMem 39 nen ! 39 fex ! 5 pos ! 39 fin ! 176 aud ! EnVocab 39 psi ! 2 num ! 0 pre ! 74 seq ! 39 enx ! InStantiate 183 t ! 78 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 184 t ! 69 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 185 t ! 69 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 186 t ! 68 pho ! 0 beg ! 0 ctu ! 74 audpsi ! AudMem 74 nen ! 74 fex ! 8 pos ! 74 fin ! 183 aud ! EnVocab 74 psi ! 0 num ! 39 pre ! 50 seq ! 74 enx ! InStantiate 188 t ! 77 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 189 t ! 69 pho ! 0 beg ! 0 ctu ! 65 audpsi ! AudMem 65 nen ! 50 fex ! 7 pos ! 56 fin ! 188 aud ! EnVocab 50 psi ! 1 num ! 74 pre ! 0 seq ! 65 enx ! InStantiate 191 t ! 73 pho ! 1 beg ! 0 ctu ! 50 audpsi ! AudMem 50 nen ! 50 fex ! 7 pos ! 56 fin ! 191 aud ! EnVocab 50 psi ! 1 num ! 0 pre ! 75 seq ! 50 enx ! InStantiate 193 t ! 72 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 194 t ! 69 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 195 t ! 76 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 196 t ! 80 pho ! 0 beg ! 0 ctu ! 75 audpsi ! AudMem 75 nen ! 75 fex ! 8 pos ! 75 fin ! 193 aud ! EnVocab 75 psi ! 0 num ! 50 pre ! 72 seq ! 75 enx ! InStantiate 198 t ! 75 pho ! 1 beg ! 1 ctu ! 0 audpsi ! AudMem 199 t ! 73 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 200 t ! 68 pho ! 0 beg ! 1 ctu ! 0 audpsi ! AudMem 201 t ! 83 pho ! 0 beg ! 0 ctu ! 72 audpsi ! AudMem 72 nen ! 72 fex ! 5 pos ! 72 fin ! 198 aud ! EnVocab 72 psi ! 2 num ! 75 pre ! 0 seq ! 72 enx ! InStantiate 1 t +! t @ vault ! t @ tov ! 1 t +! t @ nlt ! ( nlt may be basis for DAMP functions ) 72 urpsi ! 75 nen ! 5 bias ! 0 num ! 0 nwc ! 0 pho ! 0 pre ! 0 seq ! ;
: KbTraversal ( reactivate KB concepts ) 35 pov ! psiDecay psiDecay psiDecay kbtv @ 4 > IF 1 kbtv ! THEN CR ." Knowledge base traversal with kbtv at " kbtv @ . kbtv @ 1 = IF 56 nacpsi ! ." activating concept of YOU" CR 62 nounval ! nounAct 0 nacpsi ! THEN kbtv @ 2 = IF 37 nacpsi ! ." activating concept of PEOPLE" CR 62 nounval ! nounAct 0 nacpsi ! THEN kbtv @ 3 = IF 39 nacpsi ! ." activating concept of ROBOTS" CR 62 nounval ! nounAct 0 nacpsi ! THEN kbtv @ 4 = IF 68 nacpsi ! ." activating concept of TRUTH" CR 62 nounval ! nounAct 0 nacpsi ! THEN 42 pov ! ;
: ReJuvenate ( recycle oldest memory spaces ) fyi @ 2 = IF 7 EMIT CLS THEN 0 edge ! CR 1 rjc +! ." Please wait as memories migrate in ReJuvenate cycle #" rjc @ . CR t @ 2 + coda @ vault @ + DO I jrt ! jrt @ coda @ - jrt ! edge @ 1 = IF I 0 psi{ @ jrt @ 0 psi{ ! 0 I 0 psi{ ! I 1 psi{ @ jrt @ 1 psi{ ! 0 I 1 psi{ ! I 2 psi{ @ jrt @ 2 psi{ ! 0 I 2 psi{ ! I 3 psi{ @ jrt @ 3 psi{ ! 0 I 3 psi{ ! I 4 psi{ @ jrt @ 4 psi{ ! 0 I 4 psi{ ! I 5 psi{ @ jrt @ 5 psi{ ! 0 I 5 psi{ ! I 6 psi{ @ jrt @ 6 psi{ ! 0 I 6 psi{ ! I 7 psi{ @ jrt @ 7 psi{ ! 0 I 7 psi{ ! THEN edge @ 1 = IF en6 @ 1 < IF 0 en6 ! THEN I 0 en{ @ jrt @ 0 en{ ! 0 I 0 en{ ! I 1 en{ @ jrt @ 1 en{ ! 0 I 1 en{ ! I 2 en{ @ jrt @ 2 en{ ! 0 I 2 en{ ! I 3 en{ @ jrt @ 3 en{ ! 0 I 3 en{ ! I 4 en{ @ jrt @ 4 en{ ! 0 I 4 en{ ! I 5 en{ @ jrt @ 5 en{ ! 0 I 5 en{ ! I 6 en{ @ en6 ! en6 @ vault @ < IF en6 @ jrt @ 6 en{ ! 0 I 6 en{ ! THEN en6 @ coda @ vault @ + > IF en6 @ coda @ - jrt @ 6 en{ ! THEN 0 I 6 en{ ! THEN edge @ 1 = IF I 0 aud{ @ jrt @ 0 aud{ ! I 1 aud{ @ jrt @ 1 aud{ ! I 2 aud{ @ jrt @ 2 aud{ ! I 3 aud{ @ jrt @ 3 aud{ ! I 4 aud{ @ jrt @ 4 aud{ ! I 5 aud{ @ jrt @ 5 aud{ ! fyi @ 1 > IF jrt @ 0 aud{ @ EMIT THEN THEN edge @ 0 = IF 32 jrt @ 0 aud{ ! 0 jrt @ 1 aud{ ! I 2 aud{ @ 123 = IF 1 edge ! THEN 0 jrt @ 2 aud{ ! 0 jrt @ 3 aud{ ! 0 jrt @ 4 aud{ ! 0 jrt @ 5 aud{ ! 0 jrt @ 0 en{ ! 0 jrt @ 1 en{ ! 0 jrt @ 2 en{ ! 0 jrt @ 3 en{ ! 0 jrt @ 4 en{ ! 0 jrt @ 5 en{ ! 0 jrt @ 6 en{ ! 0 jrt @ 0 psi{ ! 0 jrt @ 1 psi{ ! 0 jrt @ 2 psi{ ! 0 jrt @ 3 psi{ ! 0 jrt @ 4 psi{ ! 0 jrt @ 5 psi{ ! 0 jrt @ 6 psi{ ! 0 jrt @ 7 psi{ ! THEN LOOP jrt @ t ! cns @ t @ DO 32 I 0 aud{ ! 0 I 1 aud{ ! 0 I 2 aud{ ! 0 I 3 aud{ ! 0 I 4 aud{ ! 0 I 5 aud{ ! 0 I 0 en{ ! 0 I 1 en{ ! 0 I 2 en{ ! 0 I 3 en{ ! 0 I 4 en{ ! 0 I 5 en{ ! 0 I 6 en{ ! 0 I 0 psi{ ! 0 I 1 psi{ ! 0 I 2 psi{ ! 0 I 3 psi{ ! 0 I 4 psi{ ! 0 I 5 psi{ ! 0 I 6 psi{ ! 0 I 7 psi{ ! LOOP t @ 20 - tov ! CR CR ." End of ReJuvenate #" rjc @ . ." in the AI Mind display for science museum exhibits." CR ." Tab key cycles through Normal, Transcript, " ." Tutorial, Diagnostic display-modes. " CR fyi @ 2 = IF 200 rsvp ! THEN 1 kbtv +! kbtv @ 0 > IF CR ." For lack of human input, " ." ReJuvenate calls KbTraversal" CR KbTraversal THEN rsvp @ rjc @ - rsvp ! rsvp @ 2 < IF 60 rsvp ! THEN ;
: SpeechAct ( output of a word as text or sound ) fyi @ 2 = IF CR THEN 0 audstop ! ( 1jan2008 Initially false value of flag ) 0 pho ! ( 1jan2008 Lest pho already be at 32 ) aud @ onset ! ( onset of a word is its recall-vector ) aud @ t2s ! 40 1 DO t2s @ 0 aud{ @ pho ! pho @ 32 = NOT IF pho @ EMIT ( say or display "pho" ) pho @ lastpho ! THEN pho @ 32 = IF vpos @ 1 = IF nphrnum @ 1 = IF subjpsi @ 50 = NOT IF subjpsi @ 56 = NOT IF lastpho @ 83 = NOT IF 83 pho ! 1 spacegap ! 0 vpos ! 0 nphrnum ! THEN THEN THEN THEN THEN pho @ EMIT ( say or display "pho" ) 1 audstop ! THEN 35 pov ! ( internal point-of-view "#" like mindgrid ) AudInput ( for reentry of thought back into a mind ) audstop @ 1 = IF spacegap @ 1 = IF 32 pho ! AudInput 0 spacegap ! THEN LEAVE THEN t2s @ 1+ t2s ! t2s @ 4 aud{ @ 0 = IF 32 pho ! THEN ( If end of word ) match @ 1 = IF 0 match ! LEAVE THEN LOOP 0 match ! 0 obstat ! ;
: SayYes ( to utter "YES" in response ) midway @ t @ DO I 0 en{ @ 32 = IF I 6 en{ @ aud ! LEAVE THEN -1 +LOOP SpeechAct 0 kbquiz ! 0 yesorno ! ;
: EgoAct ( revive ego after brain-dead flatline ) fyi @ 1 > IF CR CR ." Calling EgoAct; inert = " inert @ . THEN 0 recon ! 0 psi ! 0 inert ! 0 recon ! EEG @ 0 = IF fyi @ 2 = IF CR ." Repetitious thought detected; EgoAct steps in." THEN vault @ rv ! rv @ 0 > IF BEGIN rv @ 0 aud{ @ EMIT 1 rv +! rv @ 0 aud{ @ 32 > UNTIL
CR ." EgoAct module recalls the oldest memory -- " rv @ aud ! SpeechAct THEN 0 rv ! fyi @ 2 > IF CR ." EGO: EEG = " EEG @ . ." psi = " psi @ . ." topic = " topic @ . ." redux = " redux @ . THEN redux @ psi ! 40 nounval ! nounAct 0 redux ! THEN EEG @ 0 = IF 3 EEG ! THEN ;
: EnArticle ( select "a" or "the" before a noun ) nphrpos @ 7 = NOT IF nphrnum @ 1 = IF motjuste @ ghost @ = NOT IF midway @ t @ DO I 0 en{ @ 1 = IF I 6 en{ @ aud ! LEAVE THEN -1 +LOOP SpeechAct THEN motjuste @ ghost @ = IF midway @ t @ DO I 0 en{ @ 7 = IF I 6 en{ @ aud ! LEAVE THEN -1 +LOOP SpeechAct 0 nphrnum ! THEN THEN THEN nphrpos @ 7 = NOT IF nphrnum @ 2 = IF midway @ t @ DO I 0 en{ @ 7 = IF I 6 en{ @ aud ! LEAVE THEN -1 +LOOP SpeechAct 0 nphrnum ! THEN THEN dirobj @ 1 = IF motjuste @ ghost ! THEN ;
: NounPhrase ( select part of a thought ) 0 reject ! EnReify ( move abstract Psi concepts to EnVocab reality ) 0 act ! 0 aud ! 0 motjuste ! 5 opt ! 35 pov ! 0 psi ! fyi @ 1 > IF CR ." NounPhrase preview of associated concepts -- " CR ." " THEN midway @ t @ DO I 4 en{ @ 5 = I 4 en{ @ 7 = OR IF fyi @ 2 > IF I 1 en{ @ 0 > IF CR ." candidate activation = " I 1 en{ @ . ." " I 6 en{ @ unk ! BEGIN unk @ 0 aud{ @ EMIT 1 unk +! unk @ 0 aud{ @ 32 = UNTIL ." " THEN THEN I 0 en{ @ 65 = IF I 6 en{ @ audme ! THEN I 1 en{ @ act @ > IF I 0 en{ @ motjuste ! I 0 en{ @ subjpsi ! I 2 en{ @ nphrnum ! I 4 en{ @ nphrpos ! I 6 en{ @ aud ! I 6 en{ @ audjuste ! dirobj @ 1 = IF motjuste @ 50 = IF fyi @ 3 = IF CR ." nPhr: Switching dirobj I to ME" CR THEN 65 motjuste ! audme @ aud ! audme @ audjuste ! THEN THEN fyi @ 2 > IF CR ." NounPhrase: aud = " aud @ . aud @ rv ! ." urging psi concept #" motjuste @ . ." " BEGIN rv @ 0 aud{ @ EMIT 1 rv +! rv @ 0 aud{ @ 32 = UNTIL ." " 0 rv ! THEN I 1 en{ @ act ! fyi @ 2 > IF ." activation = " act @ . CR ." " THEN ELSE THEN THEN -1 +LOOP enDamp motjuste @ 0 = IF midway @ t @ DO I 0 en{ @ 54 = IF 54 motjuste ! I 6 en{ @ aud ! LEAVE THEN -1 +LOOP SpeechAct 300 rsvp ! EXIT THEN act @ nounval ! nounval @ 3 - nounval ! act @ 2 < IF motjuste @ 0 > IF 1 reject ! THEN THEN motjuste @ hipsi ! EnArticle motjuste @ nacpsi ! nounAct 0 nacpsi ! 0 nounval ! audjuste @ aud ! SpeechAct 32 EMIT fyi @ 2 > IF CR ." from NounPhrase " THEN motjuste @ topic ! instnum @ topicnum ! 0 act ! 0 psi ! ;
: ConJoin questype @ 16 = IF 18 conj ! ELSE 17 conj ! THEN midway @ t @ DO I 0 en{ @ conj @ = IF conj @ motjuste !
I 6 en{ @ aud ! LEAVE THEN -1 +LOOP SpeechAct 0 questype ! ;
: BeVerb ( intransitive verbs of being ) subjpsi @ 50 = IF motjuste @ 57 = NOT IF midway @ t @ DO I 0 en{ @ 57 = IF 57 motjuste ! I 6 en{ @ aud ! LEAVE THEN -1 +LOOP THEN THEN subjpsi @ 56 = IF motjuste @ 67 = NOT IF midway @ t @ DO I 0 en{ @ 67 = IF 67 motjuste ! I 6 en{ @ aud ! LEAVE THEN -1 +LOOP THEN THEN subjpsi @ 52 = IF motjuste @ 67 = NOT IF midway @ t @ DO I 0 en{ @ 67 = IF 67 motjuste ! I 6 en{ @ aud ! LEAVE THEN -1 +LOOP THEN THEN motjuste @ psi ! verbAct SpeechAct NounPhrase ;
: VerbPhrase ( supervise verb syntax ) EnReify 0 act ! 0 aud ! 0 detour ! 0 motjuste ! 8 opt ! 0 psi ! adverbact 32 > IF ( EnAdverb ) THEN fyi @ 1 > IF CR ." VerbPhrase preview with slosh-over indicated by + --" CR ." Noun & verb activation must slosh over onto " ." logical direct objects." CR ." " THEN midway @ t @ DO I 4 en{ @ 8 = IF fyi @ 3 = IF ." VerbPhrase" THEN fyi @ 2 > IF I 1 en{ @ 0 > IF CR ." cand. act = " I 1 en{ @ . ." " ." w. psi seq #" I 6 psi{ @ seq ! seq @ . ." " I 6 en{ @ unk ! BEGIN unk @ 0 aud{ @ EMIT 1 unk +! unk @ 0 aud{ @ 32 = UNTIL ." w. nodal dir. obj. " midway @ t @ DO I 0 psi{ @ seq @ = IF I 1 psi{ @ . ." = act " I 7 psi{ @ psi7 ! LEAVE THEN -1 +LOOP midway @ t @ DO I 0 en{ @ psi7 @ = IF I 6 en{ @ rv ! LEAVE THEN
-1 +LOOP rv @ 0 > IF BEGIN rv @ 0 aud{ @ EMIT 1 rv +! rv @ 0 aud{ @ 32 = UNTIL THEN ." in VerbPhrase spike = " spike @ . 0 rv ! ." " THEN THEN I 1 en{ @ act @ > IF ( if en1 is higher ) I 0 en{ @ motjuste ! ( store psi-tag of verb ) I 4 en{ @ predpos ! ( grab winning part of speech) I 6 en{ @ aud ! ( auditory recall-vector ) fyi @ 2 > IF CR ." VerbPhrase: aud = " aud @ . aud @ rv ! ." urging psi concept #" motjuste @ . ." " BEGIN rv @ 0 aud{ @ EMIT 1 rv +! rv @ 0 aud{ @ 32 = UNTIL ." " 0 rv ! THEN I 1 en{ @ act ! ( to test for a higher en1 ) fyi @ 3 = IF CR ." VerbPhrase: act = " act @ . ." " THEN ELSE THEN THEN -1 +LOOP motjuste @ 57 = IF BeVerb EXIT THEN motjuste @ 66 = IF BeVerb EXIT THEN motjuste @ 67 = IF BeVerb EXIT THEN act @ verbval ! 0 psi ! motjuste @ 0 > IF motjuste @ vbpsi ! THEN fyi @ 2 > IF CR ." VerbPhrase: motjuste = " motjuste @ . ." going into SPEECH." CR ." VerbPhrase: aud = " aud @ . ." going into SPEECH." THEN motjuste @ 0 = IF 1 detour ! fyi @ 1 > IF CR ." VerbPhrase: detouring when " ." no candidate-verb is found. " CR ." VerbPhrase: detour value is at " detour @ . THEN THEN motjuste @ 0 > IF act @ 20 < IF 1 detour ! 1 recon ! fyi @ 1 > IF CR ." VerbPhrase: detour because " ." verb-activation is only " act @ . THEN THEN detour @ 0 = IF nphrnum @ 1 = IF 83 inflex1 ! 1 vpos ! THEN 62 caller ! psiDamp motjuste @ hipsi ! fyi @ 2 > IF CR ." VerbPhr: lopsi @ hipsi = " lopsi @ . hipsi @ . THEN motjuste @ psi ! VerbAct SpeechAct 0 inflex1 ! 0 nphrnum ! 0 vpos ! THEN THEN detour @ 0 = IF 10 act ! fyi @ 2 > IF CR ." in VerbPhrase after SpeechAct output of verb" THEN fyi @ 2 > IF CR ." from VerbPhrase after speaking of verb, " ." psiDamping #" motjuste @ . THEN motjuste @ urpsi ! 22 residuum ! 62 caller ! 0 caller ! 2 residuum ! enDamp 32 EMIT 15 residuum ! 1 dirobj ! fyi @ 2 = IF CR ." VerbPhrase calls NounPhrase for " ." object of sentence." CR THEN NounPhrase motjuste @ 0 > IF motjuste @ dopsi ! THEN 0 dirobj ! 2 residuum ! THEN fyi @ 2 > IF CR ." VerbPhrase end: detour = " detour @ . THEN ;
: AuxVerb ( auviliary Verb ) midway @ t @ DO I 0 en{ @ 59 = IF 59 motjuste ! I 6 en{ @ aud ! LEAVE THEN -1 +LOOP SpeechAct fyi @ 2 > IF CR ." from AuxVerb after speaking of DO, " ." psiDamping concept #59 DO" THEN 59 urpsi ! 51 caller ! psiDamp 0 caller ! ;
: NegSVO ( negation of Subject + Verb + Object ) fyi @ 1 > IF CR ." Calling NegSVO (AI4U Chapter 10)." CR THEN 123 t @ 2 aud{ ! NounPhrase 32 pho ! auxVerb midway @ t @ DO I 0 en{ @ 12 = IF 12 motjuste ! I 6 en{ @ aud ! LEAVE THEN -1 +LOOP SpeechAct VerbPhrase 125 t @ 1+ 2 aud{ ! 1 t +! 1 spt +! enDamp audDamp 5 bias ! ;
: WhatAuxSDo ( What DO Subjects DO ) PsiDecay midway @ t @ DO I 0 en{ @ 54 = IF 54 motjuste ! I 6 en{ @ aud ! LEAVE THEN -1 +LOOP SpeechAct fyi @ 2 > IF CR ." from WhatAuxSDo after speaking of WHAT, " ." psiDamping concept #54" THEN 54 urpsi ! 42 caller ! psiDamp 0 caller ! auxVerb 0 motjuste ! midway @ t @ DO I 0 en{ @ topic @ = IF topic @ motjuste ! I 6 en{ @ aud ! LEAVE THEN -1 +LOOP motjuste @ urpsi ! 15 residuum ! 42 caller ! psiDamp 1 caller ! 2 residuum ! SpeechAct midway @ t @ DO I 0 en{ @ 59 = IF 59 motjuste ! I 6 en{ @ aud ! LEAVE THEN -1 +LOOP SpeechAct fyi @ 2 > IF CR ." from whatAuxSDo after speaking of DO, " ." psiDamping concept #59 DO" THEN 59 urpsi ! 42 caller ! psiDamp 0 caller ! psiDecay ;
: WhatIs ( what IS Subjects ) PsiDecay midway @ t @ DO I 0 en{ @ 54 = IF 54 motjuste ! I 6 en{ @ aud ! LEAVE THEN -1 +LOOP SpeechAct fyi @ 2 > IF CR ." from WhatIs after speaking of WHAT, " ." psiDamping concept #54" THEN 54 urpsi ! psiDamp 0 caller ! topicnum @ 2 = NOT IF midway @ t @ DO I 0 en{ @ 66 = IF 66 motjuste ! I 6 en{ @ aud ! LEAVE THEN -1 +LOOP SpeechAct fyi @ 2 > IF CR ." from WhatIs after speaking of IS, " ." psiDamping concept #66" THEN 66 urpsi ! PsiDamp 0 caller ! 0 motjuste ! THEN topicnum @ 2 = IF midway @ t @ DO I 0 en{ @ 67 = IF 67 motjuste ! I 6 en{ @ aud ! LEAVE THEN -1 +LOOP SpeechAct fyi @ 2 > IF CR ." from WhatIs after speaking of ARE, " ." psiDamping concept #67" THEN 67 urpsi ! psiDamp 0 motjuste ! 0 topicnum ! THEN midway @ t @ DO I 0 en{ @ topic @ = IF topic @ motjuste ! I 6 en{ @ aud ! LEAVE THEN -1 +LOOP motjuste @ urpsi ! 15 residuum ! PsiDamp 2 residuum ! SpeechAct PsiDecay ;
: AskUser ( selector of question formats ) fyi @ 1 > IF CR ." AskUser calls a question-module." THEN WhatIs 0 recon ! ;
: EnglishCog ( one of several possible languages ) 0 morphpsi ! 0 psi ! 0 sublen ! t @ tov ! fyi @ 2 > IF CR ." EnglishCog start: detour @ recon = " detour @ . recon @ . CR THEN yesorno @ 0 > IF SayYes CR EXIT THEN recon @ 1 = IF fyi @ 2 = IF ." EnglishCog calls the AskUser module. " CR THEN AskUser 0 recon ! ELSE jux @ 12 = IF negSVO ELSE fyi @ 2 = IF ." EnglishCog starts to think a sentence. " CR THEN CR ." Robot: " 123 t @ 2 aud{ ! NounPhrase nphrpos @ DUP 5 = SWAP 7 = OR IF VerbPhrase 0 nphrpos ! THEN THEN THEN recon @ 1 = IF fyi @ 2 = IF CR ." EnglisCogh calls Ask to increase the " ." AI knowledge base." THEN AskUser 0 recon ! 0 detour ! THEN fyi @ 2 > IF CR ." ENGCOG end: detour @ recon = " detour @ . recon @ . CR THEN 5 bias ! ;
: ThInk ( 8may2009 wiki-page form of module name ) 0 ordo ! 35 pov ! EnglishCog fyi @ 1 = IF CR THEN 0 recon ! 0 ordo ! ;
: MotorOutput ( stub for autonomous control of robots ) 7 EMIT ( MOVE_FORWARD ) ( MOVE_BACKWARDS ) ( STOP_MOTION ) ( TURN_LEFT ) ( TURN_RIGHT ) ;
: TuringTest ( Human-Computer Interaction ) fyi @ 0 = IF CLS CR CR CR CR CR CR CR t @ 300 < IF CR ." There is no warranty for MindForth AI for robots." ELSE CR THEN THEN fyi @ 1 = NOT IF CR THEN ." " fyi @ 1 = NOT IF CR THEN fyi @ 0 = IF CR ." Artificial intelligence alive and thinking since " bday @ . bmonth @ 1 = IF ." January " THEN bmonth @ 2 = IF ." February " THEN bmonth @ 3 = IF ." March " THEN bmonth @ 4 = IF ." April " THEN bmonth @ 5 = IF ." May " THEN bmonth @ 6 = IF ." June " THEN bmonth @ 7 = IF ." July " THEN bmonth @ 8 = IF ." August " THEN bmonth @ 9 = IF ." September " THEN bmonth @ 10 = IF ." October " THEN bmonth @ 11 = IF ." November " THEN bmonth @ 12 = IF ." December " THEN byear @ . 8 EMIT 46 EMIT CR THEN fyi @ 1 = NOT IF ." Time = " t @ . 8 EMIT 46 EMIT ." KB-Traversal ID = " kbtv @ . 8 EMIT 46 EMIT ." IQ = " IQ @ . 8 EMIT 46 EMIT ." Cyc = " rjc @ . ." rsvp = " rsvp @ . 8 EMIT 46 EMIT CR ." ENTER a positive or negative Subj-Verb-Obj " ." unpunctuated sentence." CR THEN fyi @ 0 = IF CR ." Display-mode is normal. Press Tab for other modes; " ." ESC to exit." CR THEN fyi @ 3 = IF CR ." Diagnostic messages - ignore during input " ." before pressing ENTER." THEN 42 pov ! ;
: SeCurity ( new wiki-page name for SECURITY module ) fyi @ 2 = IF CR ." SeCurity calls HCI TuringTest module." THEN TuringTest t @ cns @ 64 - > IF fyi @ 2 = IF CR ." SeCurity module calls ReJuvenate." THEN 61 rsvp ! ReJuvenate THEN t @ 1024 > IF t @ 1024 - midway ! ( for range limit on searches ) ELSE 1 midway ! THEN 0 quiet ! ;
: MainLoop ( changed from ALIFE for wiki doc page ) TIME&DATE byear ! bmonth ! bday ! bhour ! bminute ! bsec ! TabulaRasa EnBoot BEGIN SeCurity fyi @ 2 = IF CR ." MainLoop calls the SensoryInput module." CR THEN SensoryInput ( EmotiOn ) fyi @ 2 = IF CR ." MainLoop calls the CogitoErgoSum mind-module." CR THEN ThInk ( FreeWill ) ( MotorOutput ) AGAIN ;
: ALIFE ( Call MainLoop if not called by user. ) MainLoop ;
1. Sun.24.MAY2009 -- HOUSTON, WE HAVE A PROBLEM
Recently we gave MindForth
the ability to add an "S" at the end of any ordinary
English verb in the third-person singular form in the
present tense. Thus we can put an "S" on the word "love"
and say, "Your robot loveS you" -- if indeed your robot
has the EmotiOn mind-module and you are worthy of a
robot's love. Unfortunately, we got too much of a good
thing -- not love, but the adding of an "S" at the end of
a verb. It was straight out of "The Sorcerer's Apprentice"
by good old Walt Disney, with "S" after "S" being added in
a sibilant, hissing flood. So what do we do? We
troubleshoot the Robot AI Mind by running the berSerk code
and we try to undo the damage.
It is probably better to correct the problem at its source, where each inflectional "S" is added, rather than in the deposition of each "S" in the auditory memory channel.
Now we have eliminated the accumulating "S" problem by
using "lastpho" to test for the last phoneme being an "S"
at the end of the verb being recalled from auditory
memory. It is not a perfect solution, because oftentimes a
verb like "miss" will end in "S" anyway. We wish to solve
the problem here for most cases and then adjust the
solution later for exceptional cases.
1. Wed.20.MAY2009 -- AI MINDS FOR CONSCIOUS ROBOTS
So many robots need to have an AI Mind installed, and since MindForth is tantamount to the VisiCalc of artificial intelligence, that we now rush to add feature after feature to the budding robot AI. Recently we made MindForth able to InStantiate a singular noun upon encountering a plural English noun in the auditory robotic input stream. If you tell the robot AI4U Mind something about birds, it now sets up the singular noun "bird" as a concept. Then we encoded an algorithm of assuming from input of the article "a" that the next noun after "a" is a singular noun. If you say that you wish to manufacture "a conscious robot", the article "a" sets a flag that skips the adjective "conscious" and assigns the singular "num (ber)" to whatever noun (e.g., "robot") comes next. (And with AI4U technology we are indeed helping you to manufacture a conscious robot.) Next we need to ensure that the emergingly conscious AI Mind will use the right form of an English verb when, for example, "it talks" about a singular noun. Simply put, the software "needs" to put "s" on the end of a verb after a third-person singular noun.
1. Tues.19.MAY2009 -- USING "a" TO SET A NOUN AS SINGULAR
As we run MindForth and look for the currently most obvious problem, we notice rather keenly that the AI needs to use the indefinite article "a" to set a following noun as singular in number. Since the AI has recently gained the ability to instantiate a singular noun upon receiving its plural form in the input stream, it makes sense now to enhance the ability of the AI Mind to deal with singular nouns.
In AudRecog we already have the following code.
pho @ 83 = IF \ 1oct2008 If the final character is "S" 2 num ! \ 1oct2008 Set the "num" flag as plural THEN \ 1oct2008 End of test for "S" at end of a word.
The above code triggers an immediate setting of num(ber) as plural. When the article "a" comes in, we want not to act immediately but rather to govern a flag that will set the next incoming noun to a singular number.
One concern right now is whether to use the letter "a" or the concept of "a" as the determinant in setting the singularity flag. We should probably use the concept, so that eventually either "a" or "an" will trip the flag- setting.
In the new AI code shown below, the second part sets the singflag so that the first part can take future action. It may not really matter here which part comes first, but the idea is to let one event govern subsequent events.
singflag @ 1 = IF \ 19may2009 If flag set by "a" or "an"
pos @ 5 = IF \ 19may2009 If noun by part-of-speech POS
1 num ! \ 19may2009 Set num(ber) to singular one.
0 singflag ! \ 19may2009 Zero out flag after use.
THEN \ 19may2009 End of test for a noun after "a"
THEN \ 19may2009 End of test of singularity flag.
psi @ 1 = IF \ 19may2009 If article "a" comes in as input
1 singflag ! \ 19may2009 Set singularity-flag to one.
0 act ! \ 19apr2009 To suppress using
article "a"
THEN \ 19may2009 End of test for article "a" coming in.
2. Tues.19.MAY.2009 -- IMPLICATIONS FOR THE ENGLISH BOOTSTRAP
When we next change the EnBoot sequence, we need to include "a" and "an" and "one" as input elements that will trigger the singularity flag "singflag". We also need to put in at least one pair of opposite adjectives, so that we can use one of the adjectives to make sure that it gets skipped, as in "a big question", where the article "a" is supposed to set the singflag that will cause the next noun to be regarded as singular in number. We could use "big/small" or "good/bad" or "old/new" or "robotic/human" as adjective pairs.
1. Mon.11.MAY2009 -- ATTACKING THE SINGULAR-STEM PROBLEM
Today we would like to work on getting the AI to recognize both singular stems and plural forms of a standard English noun. Perhaps we will start out by trying to see if we can have the AI instantiate nouns ending in "s" while going back and assigning the "audpsi" ultimate tag to the penultimate phoneme which is the end of the singular stem.
Looking at the AudMem code, we realize that we need to get several new influences in there to cause the AudMem module to dip back one unit in time and assign the "audpsi" value to the penultimate phoneme that marks the end of the stem. We want the word to be a noun and to be ending in "s". We might get away with disregarding whether the word is a noun. We could just look for all words ending in "s" and then we could plunk down the "audpsi" ultimate tag not only on the final "s" phoneme but also on the penultimate phoneme. Serendipitously, in this way we would also manage to tag the stem of a third-person singular verb with an audpsi, as in, "He works," where a penultimate audpsi would identify the concept. So we get out our ASCII chart and we see that uppercase "S" is "83" in ASCII. We will test the end of words for an "S" and assign the "audpsi" value to both the final and the penultimate phoneme.
2. Tues.12.MAY.2009 -- SPOOFING THE INPUT STREAM
We will try now to achieve singular-stem recognition from plural nouns not only by putting an audpsi ultimate-tag on the penultimate phoneme, but also by setting the "ctu" continuation flag to zero ("0") in the penultimate position, so that our software will "think" that it has recognized a whole word instead of just a stem inside a noun-plural.
In the AudInput module, we have been putting our new code into the area for internal reentry. Perhaps the new code belongs in the area for external input.
Hey, perhaps all this new code should be in NewConcept, because we are trying to deal with previously unknown noun-stems.
Gee, we might try something really radical. We have created a variable
variable newpsi ( 12may2009 for singular-nounstem assignments )
so that we can be sure to assign "ctu=0" and "audpsi" only to noun-stems of a plural word coming in during user input. It might be quite radical, but useful, to put the "newpsi" value just before all incoming "S" phonemes, not just final, end-of-word "S" phonemes. We would assume that such assignments would not cause any problems for "ctu=1" word-engrams. Then, when the word-engram was finalized, we could go back in and set the "ctu=0" value to permit future recognition of the noun- stem.
3. Wed.13.MAY.2009 -- ALMOST CODE-COMPLETE
The variable "newpsi" obtains no positive (above zero) value until NewConcept is called -- which happens when?
With a new "wordend" variable we finally achieved the basic functionality that we have been seeking for the past three days, but with a few minor glitches. We used the following AudMem code.
\ 13may2009 In AudMem as called towards end of
AudInput:
pov @ 42 = IF \ 12may2009 Only during external input
pho @ 83 = IF \ 12may2009 If phoneme is "S"
\ CR ." S pho & newpsi = " pho @ . ." " newpsi
@ . \ 12may2009 test
\ ." time t = " t @ . \ 12may2009 test
newpsi @ t @ 1- 5 aud{ ! \ 12may2009 pre-"S"
audpsi
wordend @ 1 = IF \ 13may2009 If word has ended
CR ." audpsi = " audpsi @ . \ 13may2009 a test.
\ audpsi @ 0 = IF \ 13may2009 Change ctu only for
new words.
0 t @ 1- 4 aud{ ! \ 13may2009 As if "no
continuation".
\ THEN \ 13may2009 \ 13may2009 End of test for
known word.
THEN \ 13may2009 End of test for end of word
0 newpsi ! \ 12may2009 Reset for safety.
THEN \ 12may2009 End of test for "S"
THEN \ 12may2009 End of test for external input.
In an upcoming other version of MindForth, we need to overcome the minor glitches. One glitch is that the AI is setting "ctu" to zero on both the penultimate and ultimate array-row of a plural word that has just previously been learned. We would prefer that the known plural word only have ctu=0 in the final row. Another glitch is that the new code is working only after a previously unknown verb is used. It should be relatively simple to remove that particular glitch.
4. Thurs.14.MAY.2009 -- STUMPED AND STYMIED
Of the two glitches we need to work on, the more important one, and also probably easier to solve, is the problem of the new code not working with a known verb from the EnBoot English bootstrap.
In the following transcript, the new stem-rec code does not work after we use the English bootstrap verb "know".
Transcript of AI Mind interview at 7 39 3 o'clock on 14 May 2009. i know books S pho & newpsi = 83 0 time t = 215
Robot: BOOKS WHAT ARE BOOKS
When we use the previously unknown verb "use" in the following transcript, the stem-recognition code works just fine. Why? What is the difference between using an old or a new verb? Here we say "i use books" to the AI Mind.
Transcript of AI Mind interview at 7 40 7 o'clock on 14 May 2009. i us S pho & newpsi = 83 0 time t = 207 e books S pho & newpsi = 83 77 time t = 214 audpsi = 0
Robot: BOOKS WHAT ARE BOOKS
There must be a hidden influence in either OldConcept, or NewConcept, or both, because one or the other module is invoked for the verb, depending upon whether the verb is "old" or "new."
By means of some diagnostic code in AudMem, we have just learned that the "newpsi" variable has a value of zero after a verb from the English bootstrap.
Transcript of AI Mind interview at 21 8 34 o'clock on 14 May 2009. i know books AudMem: backstoring newpsi 0
We may want to troubleshoot the "newpsi", or perhaps just replace it with a "stempsi" variable.
5. Fri.15.MAY.2009 -- PINPOINTING THE PROBLEM
Theoretically we should be able to see an audpsi Aud{ engram and be able to figure out exactly how and why that particular value got placed there. But we have been having extreme difficulty over this past week.
Bingo! In the "ELSE" (if no old concept, declare new concept) area of AudInput, we have found one ancient line of code that has been causing all our grief for the past week.
nen @ tult @ 5 aud{ ! \ Store new concept
psi-tag.
THEN \ end of test for a positive-length
word;
THEN \ end of test for the presence of
a move-tag;
AudDamp \ Zero out the auditory engrams.
That top line in the snippet above has white space that made it not show up when we searched for "5 aud{ !" in the source code.
Okay, now we actually have to rename 14may09B.F as 15may09A.F and continue working with the new version designated properly for today, because now we have an actual prospect of implementing a correct algorithm for recognizing singular noun-stems within new plural nouns.
Well, we had a good scare in our maintaining of functionality today. Apparently the following block of new code in the AudInput module was making our AI lose its ability to recognize "I" properly. When we comment out the code below, the ability comes back.
pho @ 83 = IF \ 15may2009 If the word ends in "S"
ctu @ 0 = IF \ 15may2009 If word is ending
0 t @ 1- 4 aud{ ! \ 15may2009 As if "no
continuation".
THEN \ 15may2009 End of non-continuation test
THEN \ 15may2009 End of test for "S"
The problem caused us to backtrack to 14may09B.F and use it to create 15may09B.F, which we deleted after we identified the problem as presented above. In a short while of coding 15may09A.F we added some useful code that we did not want to have to re-create, so we persisted in troubleshooting our AI.
6. Fri.15.MAY.2009 -- REMARKS
The current 15may09A.F code has a lot of "Junk DNA" in it, because it tooks us several days to locate and fix the problem. Now we need to gradually remove the many instances of test code, and devise a solution for the glitch of not always having the desired penultimate setting of "ctu" from one to zero.
7. Sat.16.MAY.2009 -- ACCEPTING A RADICAL CHANGE
Today we will re-constitute 15may09B.F as a clone of 15may09A.F and we will strip away the excessive noun-stem-related comments. Then we will name a new copy of the cleaned-up code as 16may09A.F, so that we can continue coding while still having the cleaned-up code in the 15may09B.F archive.
Here is a plan. In AudMem we could constantly test for S=83 and set ctu to zero upon finding "S", while also going back and switching changed ctu values back again to "1". To avoid going back too far, we could re-switch the changed ctu values merely upon finding a non-end-of-word.
Or we could make ctu=0 the default, constantly switching it to one retroactively, except when an "S" is encountered. Or we could change the whole AudMem system, and make it include a pho=32 space-bar at the end of each word, so that we would not have to do much retroactive adjustment.
8. Sat.16.MAY.2009 -- MODIFYING THE AUDITORY MEMORY
Let's just jump right in and see what happens when we include an ASCII 32 space-bar at the end of each word and as part of each word. We are eager to hurry up and put some new AI up on the Web. The sooner we get the terminated-word code up on the Web, the sooner we establish the design as a kind of standard for AI prototypes.
Now we have gone in and added an extra row to each word in the EnBoot sequence. We will try to run the code, but we do not expect it to work.
Hmm.... The code did indeed run, but the thinking had gone haywire. We achieved no cognitive chain reaction, that is, we were not able to enter four sentences and get the AI to think in an "infinite" loop. But now we get to troubleshoot and debug. The chore of changing the EnBoot sequence has been done. We just have to make the rest of the program adjust to the changed EnBoot.
Now we are going to change some AudInput code that reacts to a space-bar pho=32. Instead of retroactively setting the ctu- flag to zero at "tult", we are going to set the ctu-flag at the current "t" time, because each word is surely at an end now.
Newxt we had better tend to problems in the AudMem code, because the EnBoot module is no longer filling in the audpsi concept numbers in the auditory memory channel. Therefore none of the bootstrap words are being recognized.
The major problem right now after the EnBoot change-over is that the AI is not recognizing any words. We may have to troubleshoot the AudRecog module.
9. Sun.17.MAY.2009 -- RE-ESTABLISHING AudRecog FUNCTIONALITY
There is obviously some tiny little glitch preventing the new, EnBoot-altered MindForth from recognizing a single word. Here we type in "you and i".
Transcript of AI Mind interview at 6 52 53 o'clock on 17 May 2009. yARc:0 ARc:0 audpsi=0 oARc:0 ARc:0 ARc:ctu=1 audpsi=0 uARc:ctu=1 audpsi=0 audpsi=0 aARc:0 ARc:0 ARc:0 ARc:0 ARc:0 audpsi=0 nARc:0 ARc:0 ARc:ctu=1 ARc:0 audpsi=0 dARc:0 ARc:ctu=1 audpsi=0 audpsi=0 iARc:0 ARc:0 ARc:0 ARc:0 ARc:0 ARc:0 audpsi=0
There must have been two instances of initial "Y" in auditory memory, for us to see two diagnostic messages. Or maybe they were just general instances of "Y". The words "YES" and "YOU" in the EnBoot sequence have initial "Y", and the words "WHY" and "THEY" have non-initial "Y".
Maybe we should start (or resume?) putting commented-out diagnostic tools inside the crucial AudRecog module, so that we may quickly troubleshoot any future problems.
When we knock out AudDamp temporarily in order to see what activations are building up on auditory engrams during the recognition of input "you", we see the following differential build-up on the EnBoot engram of YOU.
74 Y 0 # 1 1 0 75 O 8 # 0 1 0 76 U 10 # 0 1 0 77 10 # 0 0 56
That record shows a good, healthy build-up.
10. Sun.17.MAY.2009 -- REVERTING TO THE OLD EnBoot
It is proving too hard to get the auditory memory to include ASCII pho=32 spaces as the final element in each English word. Therefore we are abandoning the code of last night and today and we are reverting to the 15may09B.F cleaned-up version.
The "ctu" value is rather sacred, because it plays a central role in the recognition of a word as an "audpsi" concept. Whether we enjoy it or not, we will have to do some retroactive resetting of "ctu".
For the setting of "ctu" in current circumstances, the
most important
thing is that a final "S" comes in, as shown by a
terminating pho=32.
Therefore, without relying on "wordend", we should simply
trap for
"S" and for pho=32. When pho is 32, we should see if
the "prepho" is
ASCII S-83. So we need to have prepho available. Actually,
we need a
system that keeps track of three elements: the current
pho=32;
the previous "S"; and the element before "S". Or do we? We
need
to see that it is at least positive.
11. Sun.17.MAY.2009 -- SOLVING THE SINGULAR NOUN-STEM
PROBLEM
After seven days of arduous AI coding, we seem finally to have solved the problem of getting the AI to accept a plural English noun ending in "s" while assigning the concept number to the singular stem. We used the following AudInput test-code in the area that deals with pov=42 external input, not with internal reentry, because new words are not learned during the reentry of thoughts.
\ 17may2209 Testing for SP-32 or CR-13:
pho @ 32 = pho @ 13 = OR IF \ 17may2009
pho @ 13 = IF 10 EMIT THEN \ 17may2009
." AIptExtPho=" pho @ . \ 17may2009 test
." AIptExtPrepho=" prepho @ . \ 17may2009 test
prepho @ 83 = IF \ 17may2009 If previous pho
was "S"
\ 17may2009 In next line, time t may not have
advanced.
0 t @ 1 - 4 aud{ ! \ 17may2009 set ctu=0
before "S" end.
0 prepho ! \ 17may2009 Zero out prepho after
use.
THEN \ 17may2009 End of test for external
final "S"
THEN \ 17may2009 End of test for external space-bar
32.
1. Sun.10.MAY2009 -- RESTORING KbTraversal FUNCTIONALITY
Yesterday in 9may09A.F we further de-globalized the psi- group of variables by reclaiming "oldpsi" from the SpreadAct module for use in the OldConcept module. We created "cogpsi" for use in SpreadAct. A lot of our compromised functionality returned when we had deglobalized OldConcept, but KbTraversal stopped working, so today we need to troubleshoot KbTraversal.
We went into KbTraversal and we used "nacpsi" instead of "psi" just before calling NounAct. Thus we restored the functionality of KbTraversal.
2. Sun.10.MAY.2009 -- RESTORING who-are-you FUNCTIONALITY
When we delve back into the who-are-you problem, we discover from the following .psi data that we have lost the ability of the AI to answer a who-are-you query.
23apr09A.F:
207 : 55 13 0 0 0 5 67 55 to WHO
211 : 67 16 0 55 55 8 50 67 to ARE
215 : 50 11 0 67 67 7 67 50 to I
217 : 50 11 0 50 0 7 57 50 to I
220 : 57 15 0 50 50 8 50 57 to AM
222 : 50 36 0 57 57 7 0 50 to I
time: psi act num jux pre pos seq enx
10may09A.F:
207 : 55 13 0 0 72 5 67 55 to WHO
211 : 67 15 0 55 55 8 50 67 to ARE
215 : 50 58 0 67 55 7 67 56 to YOU
219 : 56 55 0 50 0 7 67 56 to YOU
223 : 67 15 0 56 56 8 56 67 to ARE
227 : 56 36 0 67 56 7 0 56 to YOU
time: psi act num jux pre pos seq enx
It turns out that one line of code in the block below was taking away the who-are-you functionality. By erroneously using "audpsi" as the source of the transfer-to- English "enx" value, we were nullifying the POV-based decisions from the immediately preceding code. When we abandoned "audpsi" as the source of "enx" and used "oldpsi" instead, the functionality of the who-are-you feature quasi-magically was restored.
\ The Robot Mind as a seed AI for Technological Singularity
\ approaches artificial consciousness in the following code:
\ pov @ 35 = IF fex @ psi ! THEN \ during internal (#) "pov";
pov @ 35 = IF fex @ oldpsi ! THEN \ 9may2009 during internal (#) "pov";
\ pov @ 42 = IF fin @ psi ! THEN \ external (*) "pov"
pov @ 42 = IF fin @ oldpsi ! THEN \ 9may2009 external (*) "pov"
\ psi @ enx ! \ Assume Psi number = En(glish) number. \ audpsi @ enx ! \ 9may2009 Assume audpsi number = En (glish) number.
oldpsi @ enx ! \ 10may2009 Assume oldpsi number = En (glish) number.
Below we see that the input of "you" is properly interpreted as a self-referential "I" in the AI Mind. Thus the AI is able to answer the who-are-you query with an "I AM" statement.
191 : 50 11 0 0 50 7 75 50 to I
196 : 75 35 0 0 50 8 72 75 to HELP
201 : 72 0 2 0 50 5 0 72 to KIDS
207 : 55 13 0 0 0 5 67 55 to WHO
211 : 67 13 0 55 55 8 50 67 to ARE
215 : 50 11 0 67 55 7 67 50 to I
217 : 50 11 0 50 0 7 57 50 to I
220 : 57 15 0 50 50 8 50 57 to AM
222 : 50 36 0 57 50 7 0 50 to I
We were afraid that we might have to do some deep troubleshooting of the assignment of "fin" and "fex" and "enx" tags. Luckily, a cursory inspection of the recent changes in the OldConcept code gave us an idea of what to try, and it worked.
3. Sun.10.MAY.2009 -- RESTORING AudRecog OF SINGULAR NOUN- STEMS
The following .psi report after entering "i know book" and "books teach people" shows that MindForth has regained the ability to detect a singular noun stem that was lost in the 6may09A.F version that started to de-globalize the variables. It was probably a problem in AudRecog, and the thorough de-globalizing of AudRecog made it necessay also to de-globalize OldConcept and some other mind-modules.
205 : 56 35 0 0 0 7 61 56 to YOU
210 : 61 0 0 56 56 8 76 61 to KNOW
215 : 76 10 0 61 56 5 0 76 to BOOK
220 : 76 10 0 76 0 5 66 76 to BOOK
225 : 54 0 0 76 76 5 0 54 to WHAT
228 : 66 0 2 54 54 8 76 66 to IS
233 : 76 10 0 66 54 5 0 76 to BOOK
239 : 76 10 2 76 0 5 77 76 to BOOKS
245 : 77 11 0 76 76 8 37 77 to TEACH
252 : 37 13 0 77 76 5 0 37 to PEOPLE
259 : 37 13 0 37 0 5 70 37 to PEOPLE
264 : 70 14 0 37 37 8 1 70 to HAVE
266 : 1 15 0 70 37 1 71 1 to A
271 : 71 36 1 1 37 5 0 71 to FEAR
time: psi act num jux pre pos seq enx
Although de-globalizing was accompanied by substantial grief and worry, it should be quite easier to troubleshoot the code that has been successfully de-globalized, because it is easier to pin down the operation of local variables that play out their effects in their own mind-module.
A.T. Murray
--
See also http://aimind-
i.com
http://code.googl
e.com/p/mindforth
http://agi-
roadmap.org/Roadmap_Drafts
http://www.scn.org/~mentifex/mindforth.txt
AI4U certified others as follows:
Others have certified AI4U as follows:
[ Certification disabled because you're not logged in. ]
Become a fan on facebook
Follow us on twitter
Subcribe to our RSS feed