Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/davidrmiller/biosim4
/ functions
Functions
179 in github.com/davidrmiller/biosim4
⨍
Functions
179
◇
Types & classes
29
↓ 57 callers
Method
size
src/grid.h:33
↓ 32 callers
Method
asInt
src/basicTypes.h:73
↓ 29 callers
Method
length
src/basicTypes.h:98
↓ 22 callers
Method
asNormalizedCoord
src/basicTypes.cpp:66
↓ 16 callers
Function
visitNeighborhood
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 callers
Method
set
src/grid.h:51
↓ 13 callers
Method
isInBounds
src/grid.h:42
↓ 12 callers
Method
asDir
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 callers
Method
normalize
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 callers
Method
isNormalized
src/basicTypes.h:96
↓ 9 callers
Method
raySameness
returns -1.0 (opposite directions) .. +1.0 (same direction) returns 1.0 if either vector is (0,0)
src/basicTypes.cpp:162
↓ 8 callers
Method
asCoord
Compass values: 6 7 8 3 4 5 0 1 2 */
src/basicTypes.cpp:128
↓ 8 callers
Method
asNormalizedPolar
src/basicTypes.cpp:72
↓ 8 callers
Method
isOccupiedAt
Occupied means an agent is living there.
src/grid.h:46
↓ 7 callers
Method
rotate
src/basicTypes.cpp:28
↓ 5 callers
Function
areClosef
returns true only if a and b are the same to within 4 digits accuracy
src/unitTestBasicTypes.cpp:13
↓ 5 callers
Method
rotate90DegCW
src/basicTypes.h:78
↓ 5 callers
Method
save
save the config to the .ini file
tests/pylib/config.py:45
↓ 5 callers
Method
write
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 callers
Method
asPolar
src/basicTypes.cpp:115
↓ 4 callers
Function
getTestSection
Select the test section 'testname' from the test config object.
tests/pylib/testlib.py:34
↓ 4 callers
Method
get_safe
get value without throwing exception.
tests/pylib/config.py:56
↓ 4 callers
Method
initialize
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 callers
Method
isBarrierAt
src/grid.h:44
↓ 4 callers
Method
isEmptyAt
src/grid.h:43
↓ 4 callers
Function
prob2bool
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 callers
Method
zeroFill
src/grid.h:39
↓ 3 callers
Function
genomeSimilarity
Returns 0.0..1.0 ToDo: optimize by approximation for long genomes
src/genome-compare.cpp:136
↓ 3 callers
Method
getMagnitude
src/signals.h:41
↓ 3 callers
Method
get_string
get string value from config
tests/pylib/config.py:73
↓ 3 callers
Method
init
Allocates space for the 2D grid
src/grid.cpp:10
↓ 3 callers
Function
pad
calc diff between str(thisobj) and maxlen return diff number of space chars
tests/pylib/testlib.py:278
↓ 3 callers
Function
passedSurvivalCriterion
Returns true and a score 0.0..1.0 if passed, false if failed
src/survival-criteria.cpp:10
↓ 3 callers
Function
sensorName
This converts sensor numbers to descriptive strings.
src/analysis.cpp:14
↓ 2 callers
Method
_default
create a default option if it does not yet exist
tests/pylib/config.py:93
↓ 2 callers
Method
_start
start the timer
tests/pylib/threadutils.py:120
↓ 2 callers
Method
_write_section
write a single section to the specified `fp'.
tests/pylib/config.py:120
↓ 2 callers
Function
actionName
Converts action numbers to descriptive strings.
src/analysis.cpp:44
↓ 2 callers
Function
add
add key, val to global dictionary addrpdict if minmax == True then add 2 params
tests/pylib/testlib.py:284
↓ 2 callers
Method
at
src/grid.h:48
↓ 2 callers
Function
checkFileExists
Check if file 'filename' exists. If not, create it.
tests/pylib/testlib.py:51
↓ 2 callers
Function
checkIfUint
src/params.cpp:77
↓ 2 callers
Method
createBarrier
src/createBarrier.cpp:18
↓ 2 callers
Function
displaySampleGenomes
src/analysis.cpp:354
↓ 2 callers
Method
findEmptyLocation
Finds a random unoccupied location in the grid
src/grid.cpp:18
↓ 2 callers
Function
genesMatch
Approximate gene match: Has to match same source, sink, with similar weight
src/genome-compare.cpp:10
↓ 2 callers
Function
getPopulationDensityAlongAxis
src/getSensor.cpp:10
↓ 2 callers
Function
getShortProbeBarrierDistance
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 callers
Function
getSignalDensityAlongAxis
src/getSensor.cpp:110
↓ 2 callers
Function
initializeGeneration0
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 callers
Method
load
(re)load the config from the .ini file
tests/pylib/config.py:51
↓ 2 callers
Function
makeGeneticColor
src/imageWriter.cpp:99
↓ 2 callers
Function
makeRandomGene
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 callers
Method
queueForDeath
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 callers
Function
saveOneFrameImmed
Pushes a new image frame onto .imageList.
src/imageWriter.cpp:22
↓ 2 callers
Method
updateFromConfigFile
src/params.cpp:268
↓ 2 callers
Method
weightAsFloat
float weightAsFloat() { return std::pow(weight / f1, 3.0) / f2; }
src/genome-neurons.h:33
↓ 1 callers
Method
__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 callers
Function
actionShortName
Converts action numbers to mnemonic strings. Useful for later processing by graph-nnet.py.
src/analysis.cpp:102
↓ 1 callers
Function
appendEpochLog
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 callers
Function
applyPointMutations
This function causes point mutations in a genome with a probability defined by the parameter p.pointMutationRate.
src/genome.cpp:340
↓ 1 callers
Function
averageGenomeLength
src/analysis.cpp:255
↓ 1 callers
Function
checkIfBool
src/params.cpp:104
↓ 1 callers
Function
checkIfFloat
src/params.cpp:94
↓ 1 callers
Method
checkParameters
Check parameter ranges, reasonableness, coherency, whatever. This is typically called only once after the parameters are first read.
src/params.cpp:323
↓ 1 callers
Method
createWiringFromGenome
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 callers
Function
cropLength
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 callers
Function
cullUselessNeurons
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 callers
Method
deathQueueSize
src/peeps.h:39
↓ 1 callers
Function
displaySensorActionReferenceCounts
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 callers
Method
drainDeathQueue
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 callers
Method
drainMoveQueue
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 callers
Function
endOfGeneration
src/endOfGeneration.cpp:16
↓ 1 callers
Function
endOfSimStep
src/endOfSimStep.cpp:24
↓ 1 callers
Function
executeActions
src/executeActions.cpp:68
↓ 1 callers
Method
fade
Fades the signals
src/signals.cpp:46
↓ 1 callers
Method
feedForward
src/feedForward.cpp:42
↓ 1 callers
Function
generateChildGenome
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 callers
Function
geneticDiversity
returns 0.0..1.0 Samples random pairs of individuals regardless if they are alive or not
src/genome-compare.cpp:153
↓ 1 callers
Function
getBoolVal
src/params.cpp:110
↓ 1 callers
Function
getResultParams
Read the test app config file and filter for result parameters. Return a dictionary.
tests/pylib/testlib.py:197
↓ 1 callers
Function
getSignalDensity
src/getSensor.cpp:88
↓ 1 callers
Function
hammingDistanceBits
Works only for genomes of equal length
src/genome-compare.cpp:89
↓ 1 callers
Function
hammingDistanceBytes
Works only for genomes of equal length
src/genome-compare.cpp:114
↓ 1 callers
Method
increment
Is it ok that multiple readers are reading this container while this single thread is writing to it? todo!!!
src/signals.cpp:20
↓ 1 callers
Method
init_defaults
add the missing default values, default is a list of defaults
tests/pylib/config.py:38
↓ 1 callers
Function
initialNeuronOutput
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 callers
Function
initializeNewGeneration
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 callers
Method
isBorder
src/grid.h:47
↓ 1 callers
Function
jaro_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 callers
Function
longProbeBarrierFwd
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 callers
Function
longProbePopulationFwd
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 callers
Function
makeNodeList
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 callers
Function
makeRandomGenome
Returns by value a single genome with random genes.
src/genome.cpp:57
↓ 1 callers
Function
makeRenumberedConnectionList
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 callers
Method
printGenome
Format: 32-bit hex strings, one per gene
src/analysis.cpp:146
↓ 1 callers
Method
printIGraphEdgeList
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 callers
Function
printSensorsActions
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 callers
Method
queueForMove
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 callers
Function
randomBitFlip
This applies a point mutation at a random bit in a genome.
src/genome.cpp:269
next →
1–100 of 179, ranked by callers