#] #] ********************* #] "$d_MindCode"'12_MindCode [data, optr]s.txt' generated with : bash "$d_bin""MindCode [data, optr]s.sh" list generated : 14November2023 14h46m see also "$d_Qndfs""QNial list [,NON]LOCALs.ndf" "$d_Qndfs""Mind2023/5_MindCode operator explanations.txt" 48************************************************48 24************************24 # Table of Contents : # $ grep "^#]" "$d_MindCode"'12_MindCode [data, optr]s.txt' | sed "s|^#\] | |" # 24************************24 08********08 #] list of [comment, data, optr]s ********************* #] 'arith, trig examples.ndf' sol IS solitary - intg00_sensor IS - [example, test] integer network setup intg00_struct IS - intg00_motor IS - real00_sensor IS- [example, test] real network setup real00_struct IS - real00_motor IS - Code tests - these should be lauched from 'MindCode/MindCode basics.ndf' arithTrig_tests IS - standard checks that arithTrig operators function as expected primitive ops - [sign_it, power_series, spikes_to_net] 26Mar2020 not yet implemented bits_to_intg, spikes_to_intg, intg_to_bits, intg_to_spikes net_construct IS OP net_specs - build code for net based on net_specs - 26Mar2020 not yet implemented net sensory (inputs) - [inConstant, inSeries, inFeedback, envInput] 26Mar2020 not yet implemented standard basic trigger patterns [now, cum, seq, tim]Trgr 26Mar2020 no longer working - probably due to many code changes ********************* #] 'basics - clusters.ndf' - optrs to [create, connect, test] various cluster types +-----+ Initialize globals +-----+ clusters clusDisplay IS OP clusIdentStart clusIdentEnd - show a range of cluson typeValues clusNeurDisplay IS OP clusIdentStart clusIdentEnd - show a range of cluson typeValues clusSize_increment - expand the list (including non-assigned) of clusters clusIdent_get - get clusIdent for new cluster, increment the lastClusterPointer clus_create IS OP classPhr - generic optr for adding clusters clusNeurs_create IS OP clusIdent n_neurons - create neurons for a cluster +-----+ basic cluster tools tblLookUp IS OP tblCols inns - lookup table fudge instead of defining neuron connections within cluster +-----+ examples ********************* #] 'basics - neurons, clusters.ndf' - optrs to [create, connect, test] various neuron types +-----+ Initialize globals neurDisplay IS OP neurIdentStart neruIdentEnd - show a range of neuron typeValues clusDisplay IS OP clusIdentStart clusIdentEnd - show a range of cluson typeValues clusNeurDisplay IS OP clusIdentStart clusIdentEnd - show a range of cluson typeValues +-----+ neurons neurSize_increment - expand the list (including non-assigned) of neurons neurIdent_get - get neurIdent for new neuron, increment the lastNeuronPointer neur_create IS OP classPhr - generic optr for adding neuron neur_connectStd IS OP neurIdent neurClassPhr dendIdents axonIdents - standard setup of connections for neuron neur_copy IS OP neurIdent - create a new neuron by copying an existing, keep connections neur_delete IS OP neurIdent - delete a neuron, don't remove [list, connection, etc]s, just re-class +-----+ clusters clusSize_increment - expand the list (including non-assigned) of clusters clusIdent_get - get clusIdent for new cluster, increment the lastClusterPointer clus_create IS OP classPhr - generic optr for adding clusters clusNeurs_create IS OP clusIdent n_neurons - create neurons for a cluster +-----+ examples ********************* #] 'basics - neurons.ndf' - optrs to [create, connect, test] various neuron types +-----+ Initialize globals neurDisplay IS OP neurIdentStart neruIdentEnd - show a range of neuron typeValues +-----+ neurons neurSize_increment - expand the list (including non-assigned) of neurons neurIdent_get - get neurIdent for new neuron, increment the lastNeuronPointer neur_create IS OP classPhr n_steps - generic optr for adding neuron neur_copy IS OP neurIdent - create a new neuron by copying an existing, keep connections neur_delete IS OP neurIdent - delete a neuron, don't remove [list, connection, etc]s, just re-class +-----+ examples ********************* #] 'bits to-from [intg, real].ndf' +-----+ primitive ops sign_it IS OP spikeTrain - converts a "sign" spike of a train to [+-] +-----+ integers bits_to_intg IS OP bits - convert intg bits to integer number, high bit on -> negative spikes_to_intg IS OP bits - [s2i], for final output: spike pattern to integer number intg_to_bits IS OP intg_in - integer number to bitWidth code, first bit is sign (+-1) intg_to_spikes IS OP intg_in - [i2s], integer number to 8 neuron spike pattern +-----+ real numbers - bits_to_real IS OP bits - spikes_to_real IS OP spikes - [s2r], spike pattern to real number real_to_bits IS OP real - real number to bitCode real_to_spikes IS OP real netID - [r2s], integer number to 8 neuron spike pattern ********************* #] 'clusters/integer add.ndf' - optrs to [create, connect, test] integer clusters clusInt_create IS - create integer cluster, internal connects clusInt_connect IS OP clusIdent0 clusIdent1 - external connects clusIdent0 outputs to clusIdent1 inputs clusIntAdd_create IS OP nBits - nBits is the size of the ints to be added clusIntAdd IS OP nBits - nBits is the size of the ints to be added +-----+ examples ********************* #] 'clusters/series.ndf' - optrs to [create, connect, test] series clusters clusFireInSeq_create IS OP nBits typPhr - create integer cluster, internal connects clusSeries_create IS OP nBits typPhr - create series cluster and its internal connects clusSer_connect IS OP clusIdent0 clusIdent1 - external connects clusIdent0 outputs to clusIdent1 inputs +-----+ examples ********************* #] 'code test/bits to-from [intg, real] tests.ndf' link d_QNial_mine 'MindCode/code test/bits to-from [intg, real] tests.ndf' integers_test IS - test correctness of results using known results reals_test IS - test correctness of results using known results ********************* #] 'code test/fire tests.ndf' fire_test01 IS - simple first test to see if "fire" operator works as expected ********************* #] 'code test/index tests.ndf' link d_QNial_mine 'MindCode/code test/index tests.ndf' nmID_to_ID_test IS - test correctness of results using known results ********************* #] 'code test/MLP tests.ndf' - 10Aug2021 incomplete +-----+ net sensory (inputs) and motor controls (outputs) intgConstNetIDL - netIDs for integer constant sensory inputs to net realConstNetIDL - netIDs for real constant sensory inputs to net inConstantL - sequence expressions for sensory inputs net_struct IS - net_morphFlip IS - [morph, flip]ing parameters 'modL' - neuromodulator state [dopamine, serotonin, noradrenaline, acetocholine] 'wghtL' - weight list, required for classical (non-epi-DNA) neurons net_triggers IS - net_results IS - very simple example net 'fireL' - fire state of the net output, expressed as spikes (booleans) 'ResStdL' - "standard" result (presumably correct result for comparison against ResCalcL) 'ResCalcL' - results at current time step 'OKL' - check if net produced target result ('ResStdL' = 'ResCalcL') ********************* #] 'code test/[time, scalars] tests.ndf' integers_test IS - test correctness of results using known results reals_test IS - test correctness of results using known results ********************* #] 'code test/trigger [now, cum, seq, tim, mix] tests.ndf' notes trgr_test IS - test correctness of results, no history, just nowFireL ********************* #] 'control structures.ndf' link d_QNial_mine 'MindCode/code test/control structures.ndf' *** Control structures if_exprn_Z80 IS OP netID strtNetID endNetID ifNetID for_loop_Z80 IS OP netID strtNetID endNetID sequenceID while_loop_Z80 IS OP netID strtNetID endNetID sequenceID ********************* #] 'cycle [load, fire, cycle, stop, test].ndf' - 10Aug2021 needs ravamp +-----+ build MindCode global [network, cols] local_to_global_cols IS - based on all sub_nets loadded, adapt local-to-global indexing nmID_to_ID IS OP nmID - given the nmID=[nameL, IDsubL], find the stdID stdInOutTrig IS - build stdOutL list of (each net [input, output, trgrPat] connections) stndNet_build IS - add n_cols of of "standard" cnstNet data to corresponding globalCols of MindCode +-----+ fire [sensory, netID fire IS OP netID - fire netID (of lastFireL nets), using its optr +-----+ MindCode [stop, cycle, load, test] MindCode_stop IS - output the final results MindCode_cycle IS - fire appropriate neurons, then update the net MindCode_load IS - load all sub-nets MindCode_tests IS - collection of standard checks that operators function as expected MindCode_cycle load MindCode ; ********************* #] 'data types.ndf' List of typedefs from all MindCode .ndfs MindCode data types - see +-----+ [simple, common] data types are defined here +-----+ [simple, common] data types are defined here setup_8bit IS - currently 8 neuron spike patterns (8 bits = byte, signed) setup_32bit IS - 8 neuron spike patterns (8 bits = byte, signed) +-----+ power_series IS OP bitWidth - produce a power series for conversion of bits to [intg, real, etc] power_series IS - currently 8 neuron spike patterns (8 bits = byte, signed) ********************* #] 'globals initialize.ndf' - +-----+ initialize global variables initGlobals IS - initialise global variables +-----+ view MindCode global [network, cols] table_write IS OP titles - ONLY for columns of the global MindCode net!!! anyTable_write IS OP titles dataTable - output any table with single-line headers ********************* #] 'hybrid symbolic-connectionist nets.ndf' - 10Aug2021 incomplete different arrangements of neural modules loaddefs link d_Qndfs 'MindCode/MindCode basics.ndf' - +-----+ build MindCode global [network, cols] local_to_global_cols IS - based on all sub_nets loadded, adapt local-to-global indexing nmID_to_ID IS OP nmID - given the nmID=[nameL, IDsubL], find the stdID stdInOutTrig IS - build stdOutL list of (each net [input, output, trgrPat] connections) stndNet_build IS - add n_cols of of "standard" cnstNet data to corresponding globalCols of MindCode +-----+ fire [sensory, netID fire IS OP netID - fire netID (of lastFireL nets), using its optr +-----+ MindCode [stop, cycle, load, test] MindCode_stop IS - output the final results MindCode_cycle IS - fire appropriate neurons, then update the net MindCode_load IS - load all sub-nets MindCode_tests IS - collection of standard checks that operators function as expected MindCode_cycle load MindCode ; ********************* $ loaddefs link d_Qndfs 'Mind2023/MindCode for callerID-SNNs.ndf' library file, NOT run by itself, run from header eg 'callerID-SNNs- test.ndf' Nomenclature : 08********08 [Turing, von Neuman]-like code +-----+ oneDat code : cmdBitShift IS cmdLn IS cmdExp IS cmdOpp IS cmdInvert IS cmdSin IS cmdCos IS cmdTan IS cmdArcSin IS cmdArcCos IS cmdInvert IS cmdArcTan IS cmdInvert IS +-----+ twoDat code : cmdAdd IS cmdMinus IS cmdMultiply IS cmdDivide IS cmdInvert IS +-----+ threeDat code : cmdInvert IS cmdInvert IS cmdInvert IS cmdInvert IS cmdInvert IS +-----+ locate seq, find [cmd, dat], not sure [same, diff]*[DNA, RNA, mRNA, etc] : DNA_transcribe_RNA IS - for program [, segment]? RNA_microTube_addr IS - for program [, segment]? RNA_get_seq IS RNA_cut_seq IS +-----+ baseLoop : cmdInvert IS baseLoop IS - specify program code baseLoop IS - run program code, [run, build] subCod ********************* #] 'MLP - multi-layered perceptron.ndf' - 10Aug2021 vastly incomplete classical NNs perceptron IS OP neuronID - classical continuous neuron, inNets=(synaps, weight) MLP_backprop IS OP netID - basic feedforward MLP training algorithm MLP_orderiv IS OP netID - solid MLP training algorithm ********************* #] 'net finder.ndf' link d_QNial_mine 'MindCode/net finder.ndf' finders - find nets that is available to do a task, amongh those that are able to do it findArith IS OP order type optr - search for a net that can handle [type,op] findExpert IS OP order type op - search for a net that can handle [type,op] taskers - allocate a task to one of nets capable of doing it arithTasker IS OP order type op - search for a net that can handle [type,op] formulators - arithFormulator IS OP problem - translate a [problem, objective, interest, curiosity] to a useable format commanders - drive results cmndrQNial IS OP order - demands made simply via QNial [data, op, transform]s (code) "personnel" (nets) cmndrClient IS OP order - demands made of "clients" (nets) cmndrPredator IS OP order - demands made of "predators" (nets) cmndrPrey IS OP order - demands made of "prey" (nets) ********************* #] 'neurons/logic gates.ndf' - res ipsa loquitor +-----+ Logic neurons neurNOT_create IS - res ipsa loquitor neurAND_create IS - res ipsa loquitor neurOR_create IS - res ipsa loquitor neurNOR_create IS - res ipsa loquitor neurNAND_create IS - res ipsa loquitor neurNEQ_create IS - res ipsa loquitor neurEQ_create IS - res ipsa loquitor +-----+ clusBranch_2In3Out clusBranch_2In3Out_fire_tbl - firing rule clusBranch_2In3Out_fire IS OP clusIdent - simple branch on [inn0 inn1] to [out0 out1 carry] clusBranch_2In3Out_fire_test IS - res ipsa loquitor clusBranch_2In3Out_create IS - create simple [activate, inhibit] branch on binary input +-----+ clusBranchInt8_create clusBranchInt8_create IS - simple [activate, inhibit] branch on binary input ********************* #] 'start MindCode.ndf' - simple check startup of MindCode - [loaddefs, globals, etc] ********************* #] 'trigger patterns.ndf' standard basic trigger patterns [now, cum, seq, tim]Trgr netIDs pass general data (NOT just a single spike), which can be used in triggers nowTrgr IS OP trgrPat histPat - no history, just (first lastFireL) cumTrgr IS OP trgrPat histPat - [order, timing] not important seqTrgr IS OP trgrPat histPat - sequence important, but not timing timTrgr IS OP trgrPat histPat - [sequence, timing] are important! mixTrgr IS OP trgrPat histPat - mixture of other trgrTyps (each case is special, separate oprtr) link d_QNial_mine 'MindCode/Z80 operator listing.ndf' *** Usage via fire_apply (see "MindCode basics.ndf") fire IS OP netID - fire netID (of nowFireL nets), using its optr *** Logic operators 'and' 'or' 'not' '=' ['~=', 'unequal'] 'diverse' *** Comparison operators (boolean) ['>' , 'gt' ] ['>=' , 'gte'] ['<' , 'lt' ] ['<=' , 'lte'] 'match' 'mate' 'max' 'min' 'up' *** Types operators (boolean), for atomic types 'isboolean' 'ischar' 'isfault' 'isinteger' 'isphrase' 'isreal' 'isstring' *** Arithmetic operators, [integer,real] [inputs, output] where Xxx = [Z80, Pat, ...] Pat = pattern, [unary, binary, multi] pervasive ['sumXxx'] - multi, ['productXxx'] - multi, 'timesXxx' - binary, 'divideXxx'] - binary, 'opp' - pair, produce the negative (* -1) of the single input to netID '*' - multiply inputs of ALL preNetIDs 'recip' - produce the reciprocal (1 /) of the SINGLE input to netID 'exp' - produce the exponent (e^) of the SINGLE input to netID 'ln' - produce the natural logarithm (ln) of the SINGLE input to netID ['^', 'power'] - inNets = [baseNet, exptNet] in that order, raise baseNet to the power *** Trigonometric operators require real inputs 'sin' 'cos' 'tan' 'cosh' 'tanh' 'arcsin' 'arccos' 'arctan' 'arcsinh' 'arccosh' 'arctanh' *** NN-specific basics - sigmoidal, counter, timer, concept neuron 'count' timer IS OP timerNetID - ['dotProdxxx', 'INNER [+, *]'] IS - produces the inner (dot) product of two arrays of arbitrary dimension 08********08 #] MindCode globals (QNial) axonDelayL axonIdentL axonInhibL bitCnt_base bitCnt_expt bitCnt_intgBase clusClassL clusIdentL clus_last clusList_increment clusNeurnL cycle_max dendDelayL dendIdentL dendInhibL epigenL fireL fireStdL flag_cycle_output histPatL histPatNowL IDL IDsubL inhibL inHistL inL inNmIDL intg_high intg_loww modL nameL n_clus netIDL net_rows neurClassL neurFiredL neurIdentL neurInFireL neur_last neurList_increment neurStateL n_neur NONLOCAL nowFireL OKL opL optrL out outL outs outTypL paramL p_log realBase_max realCode real_high real_loww ResCalcL ResCalcLtTitles ResStdL sensIDL subTemp ToffL trgrPatL trgrPatNmIDL trgrTyp trgrTypL trigTitles TwaitL typeL waitTL wghtL XrefIDL XrefIDsubL XrefNmL enddoc