MCPcopy Create free account

hub / github.com/davidrmiller/biosim4 / functions

Functions179 in github.com/davidrmiller/biosim4

↓ 57 callersMethodsize
src/grid.h:33
↓ 32 callersMethodasInt
src/basicTypes.h:73
↓ 29 callersMethodlength
src/basicTypes.h:98
↓ 22 callersMethodasNormalizedCoord
src/basicTypes.cpp:66
↓ 16 callersFunctionvisitNeighborhood
This is a utility function used when inspecting a local neighborhood around some location. This function feeds each valid (in-bounds) location in the
src/grid.cpp:35
↓ 14 callersMethodset
src/grid.h:51
↓ 13 callersMethodisInBounds
src/grid.h:42
↓ 12 callersMethodasDir
Effectively, we want to check if a coordinate lies in a 45 degree region (22.5 degrees each side) centered on each compass direction. By first rotatin
src/basicTypes.cpp:94
↓ 11 callersMethodnormalize
A normalized Coord has x and y == -1, 0, or 1. A normalized Coord may be used as an offset to one of the 8-neighbors. We'll convert the Co
src/basicTypes.cpp:84
↓ 10 callersMethodisNormalized
src/basicTypes.h:96
↓ 9 callersMethodraySameness
returns -1.0 (opposite directions) .. +1.0 (same direction) returns 1.0 if either vector is (0,0)
src/basicTypes.cpp:162
↓ 8 callersMethodasCoord
Compass values: 6 7 8 3 4 5 0 1 2 */
src/basicTypes.cpp:128
↓ 8 callersMethodasNormalizedPolar
src/basicTypes.cpp:72
↓ 8 callersMethodisOccupiedAt
Occupied means an agent is living there.
src/grid.h:46
↓ 7 callersMethodrotate
src/basicTypes.cpp:28
↓ 5 callersFunctionareClosef
returns true only if a and b are the same to within 4 digits accuracy
src/unitTestBasicTypes.cpp:13
↓ 5 callersMethodrotate90DegCW
src/basicTypes.h:78
↓ 5 callersMethodsave
save the config to the .ini file
tests/pylib/config.py:45
↓ 5 callersMethodwrite
Write an .ini-format representation of the configuration state. If `space_around_delimiters' is True (the default), delimiters between keys
tests/pylib/config.py:102
↓ 4 callersMethodasPolar
src/basicTypes.cpp:115
↓ 4 callersFunctiongetTestSection
Select the test section 'testname' from the test config object.
tests/pylib/testlib.py:34
↓ 4 callersMethodget_safe
get value without throwing exception.
tests/pylib/config.py:56
↓ 4 callersMethodinitialize
This is called when any individual is spawned. The responsiveness parameter will be initialized here to maximum value of 1.0, then depending on which
src/indiv.cpp:13
↓ 4 callersMethodisBarrierAt
src/grid.h:44
↓ 4 callersMethodisEmptyAt
src/grid.h:43
↓ 4 callersFunctionprob2bool
Given a factor in the range 0.0..1.0, return a bool with the probability of it being true proportional to factor. For example, if factor == 0.2, then
src/executeActions.cpp:17
↓ 4 callersMethodzeroFill
src/grid.h:39
↓ 3 callersFunctiongenomeSimilarity
Returns 0.0..1.0 ToDo: optimize by approximation for long genomes
src/genome-compare.cpp:136
↓ 3 callersMethodgetMagnitude
src/signals.h:41
↓ 3 callersMethodget_string
get string value from config
tests/pylib/config.py:73
↓ 3 callersMethodinit
Allocates space for the 2D grid
src/grid.cpp:10
↓ 3 callersFunctionpad
calc diff between str(thisobj) and maxlen return diff number of space chars
tests/pylib/testlib.py:278
↓ 3 callersFunctionpassedSurvivalCriterion
Returns true and a score 0.0..1.0 if passed, false if failed
src/survival-criteria.cpp:10
↓ 3 callersFunctionsensorName
This converts sensor numbers to descriptive strings.
src/analysis.cpp:14
↓ 2 callersMethod_default
create a default option if it does not yet exist
tests/pylib/config.py:93
↓ 2 callersMethod_start
start the timer
tests/pylib/threadutils.py:120
↓ 2 callersMethod_write_section
write a single section to the specified `fp'.
tests/pylib/config.py:120
↓ 2 callersFunctionactionName
Converts action numbers to descriptive strings.
src/analysis.cpp:44
↓ 2 callersFunctionadd
add key, val to global dictionary addrpdict if minmax == True then add 2 params
tests/pylib/testlib.py:284
↓ 2 callersMethodat
src/grid.h:48
↓ 2 callersFunctioncheckFileExists
Check if file 'filename' exists. If not, create it.
tests/pylib/testlib.py:51
↓ 2 callersFunctioncheckIfUint
src/params.cpp:77
↓ 2 callersMethodcreateBarrier
src/createBarrier.cpp:18
↓ 2 callersFunctiondisplaySampleGenomes
src/analysis.cpp:354
↓ 2 callersMethodfindEmptyLocation
Finds a random unoccupied location in the grid
src/grid.cpp:18
↓ 2 callersFunctiongenesMatch
Approximate gene match: Has to match same source, sink, with similar weight
src/genome-compare.cpp:10
↓ 2 callersFunctiongetPopulationDensityAlongAxis
src/getSensor.cpp:10
↓ 2 callersFunctiongetShortProbeBarrierDistance
Converts the number of locations (not including loc) to the next barrier location along opposite directions of the specified axis to the sensor range.
src/getSensor.cpp:55
↓ 2 callersFunctiongetSignalDensityAlongAxis
src/getSensor.cpp:110
↓ 2 callersFunctioninitializeGeneration0
Requires that the grid, signals, and peeps containers have been allocated. This will erase the grid and signal layers, then create a new population in
src/spawnNewGeneration.cpp:18
↓ 2 callersMethodload
(re)load the config from the .ini file
tests/pylib/config.py:51
↓ 2 callersFunctionmakeGeneticColor
src/imageWriter.cpp:99
↓ 2 callersFunctionmakeRandomGene
Returns by value a single gene with random members. See genome.h for the width of the members. ToDo: don't assume the width of the members in gene.
src/genome.cpp:42
↓ 2 callersMethodqueueForDeath
Safe to call during multithread mode. Indiv will remain alive and in-world until end of sim step when drainDeathQueue() is called. It's ok if the same
src/peeps.cpp:31
↓ 2 callersFunctionsaveOneFrameImmed
Pushes a new image frame onto .imageList.
src/imageWriter.cpp:22
↓ 2 callersMethodupdateFromConfigFile
src/params.cpp:268
↓ 2 callersMethodweightAsFloat
float weightAsFloat() { return std::pow(weight / f1, 3.0) / f2; }
src/genome-neurons.h:33
↓ 1 callersMethod__call__
dispatch signal to all connected slots. This is a synchronous operation, It will not return before all slots have been called.
tests/pylib/threadutils.py:68
↓ 1 callersFunctionactionShortName
Converts action numbers to mnemonic strings. Useful for later processing by graph-nnet.py.
src/analysis.cpp:102
↓ 1 callersFunctionappendEpochLog
The epoch log contains one line per generation in a format that can be fed to graphlog.gp to produce a chart of the simulation progress. ToDo: remove
src/analysis.cpp:272
↓ 1 callersFunctionapplyPointMutations
This function causes point mutations in a genome with a probability defined by the parameter p.pointMutationRate.
src/genome.cpp:340
↓ 1 callersFunctionaverageGenomeLength
src/analysis.cpp:255
↓ 1 callersFunctioncheckIfBool
src/params.cpp:104
↓ 1 callersFunctioncheckIfFloat
src/params.cpp:94
↓ 1 callersMethodcheckParameters
Check parameter ranges, reasonableness, coherency, whatever. This is typically called only once after the parameters are first read.
src/params.cpp:323
↓ 1 callersMethodcreateWiringFromGenome
This function is used when an agent is spawned. This function converts the agent's inherited genome into the agent's neural net brain. There is a clos
src/genome.cpp:197
↓ 1 callersFunctioncropLength
If the genome is longer than the prescribed length, and if it's longer than one gene, then we remove genes from the front or back. This is used only w
src/genome.cpp:302
↓ 1 callersFunctioncullUselessNeurons
If a neuron has no outputs or only outputs that feed itself, then we remove it along with all connections that feed it. Reiterative, because after we
src/genome.cpp:165
↓ 1 callersMethoddeathQueueSize
src/peeps.h:39
↓ 1 callersFunctiondisplaySensorActionReferenceCounts
Print how many connections occur from each kind of sensor neuron and to each kind of action neuron over the entire population. This helps us to see wh
src/analysis.cpp:318
↓ 1 callersMethoddrainDeathQueue
Called in single-thread mode at end of sim step. This executes all the queued deaths, removing the dead agents from the grid.
src/peeps.cpp:44
↓ 1 callersMethoddrainMoveQueue
Called in single-thread mode at end of sim step. This executes all the queued movements. Each movement is typically one 8-neighbor cell distance but t
src/peeps.cpp:76
↓ 1 callersFunctionendOfGeneration
src/endOfGeneration.cpp:16
↓ 1 callersFunctionendOfSimStep
src/endOfSimStep.cpp:24
↓ 1 callersFunctionexecuteActions
src/executeActions.cpp:68
↓ 1 callersMethodfade
Fades the signals
src/signals.cpp:46
↓ 1 callersMethodfeedForward
src/feedForward.cpp:42
↓ 1 callersFunctiongenerateChildGenome
This generates a child genome from one or two parent genomes. If the parameter p.sexualReproduction is true, two parents contribute genes to the offsp
src/genome.cpp:355
↓ 1 callersFunctiongeneticDiversity
returns 0.0..1.0 Samples random pairs of individuals regardless if they are alive or not
src/genome-compare.cpp:153
↓ 1 callersFunctiongetBoolVal
src/params.cpp:110
↓ 1 callersFunctiongetResultParams
Read the test app config file and filter for result parameters. Return a dictionary.
tests/pylib/testlib.py:197
↓ 1 callersFunctiongetSignalDensity
src/getSensor.cpp:88
↓ 1 callersFunctionhammingDistanceBits
Works only for genomes of equal length
src/genome-compare.cpp:89
↓ 1 callersFunctionhammingDistanceBytes
Works only for genomes of equal length
src/genome-compare.cpp:114
↓ 1 callersMethodincrement
Is it ok that multiple readers are reading this container while this single thread is writing to it? todo!!!
src/signals.cpp:20
↓ 1 callersMethodinit_defaults
add the missing default values, default is a list of defaults
tests/pylib/config.py:38
↓ 1 callersFunctioninitialNeuronOutput
When a new population is generated and every individual is given a neural net, the neuron outputs must be initialized to something: constexpr float in
src/genome-neurons.h:83
↓ 1 callersFunctioninitializeNewGeneration
Requires a container with one or more parent genomes to choose from. Called from spawnNewGeneration(). This requires that the grid, signals, and peeps
src/spawnNewGeneration.cpp:40
↓ 1 callersMethodisBorder
src/grid.h:47
↓ 1 callersFunctionjaro_winkler_distance
The jaro_winkler_distance() function is adapted from the C version at https://github.com/miguelvps/c/blob/master/jarowinkler.c under a GNU license, ve
src/genome-compare.cpp:27
↓ 1 callersFunctionlongProbeBarrierFwd
Returns the number of locations to the next barrier in the specified direction, not including loc. Ignores agents in the way. If the distance to the b
src/getSensor.cpp:177
↓ 1 callersFunctionlongProbePopulationFwd
Returns the number of locations to the next agent in the specified direction, not including loc. If the probe encounters a boundary or a barrier befor
src/getSensor.cpp:153
↓ 1 callersFunctionmakeNodeList
Scan the connections and make a list of all the neuron numbers mentioned in the connections. Also keep track of how many inputs and outputs each neuro
src/genome.cpp:100
↓ 1 callersFunctionmakeRandomGenome
Returns by value a single genome with random genes.
src/genome.cpp:57
↓ 1 callersFunctionmakeRenumberedConnectionList
Convert the indiv's genome to a renumbered connection list. This renumbers the neurons from their uint16_t values in the genome to the range 0..p.maxN
src/genome.cpp:75
↓ 1 callersMethodprintGenome
Format: 32-bit hex strings, one per gene
src/analysis.cpp:146
↓ 1 callersMethodprintIGraphEdgeList
This prints a neural net in a form that can be processed with graph-nnet.py to produce a graphic illustration of the net.
src/analysis.cpp:233
↓ 1 callersFunctionprintSensorsActions
List the names of the active sensors and actions to stdout. "Active" means those sensors and actions that are compiled into the code. See sensors-acti
src/analysis.cpp:130
↓ 1 callersMethodqueueForMove
Safe to call during multithread mode. Indiv won't move until end of sim step when drainMoveQueue() is called. Should only be called for living agents.
src/peeps.cpp:59
↓ 1 callersFunctionrandomBitFlip
This applies a point mutation at a random bit in a genome.
src/genome.cpp:269
next →1–100 of 179, ranked by callers