Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Paul-G2/copycat-js
/ functions
Functions
381 in github.com/Paul-G2/copycat-js
⨍
Functions
381
◇
Types & classes
134
↓ 30 callers
Method
_addNode
* Adds a node to the Slipnet. * * @private
src/Slipnet.js:250
↓ 21 callers
Method
spansString
* Indicates whether this Letter or Group constitutes the entire string. *
src/WorkspaceObject.js:151
↓ 18 callers
Method
coinFlip
* Returns true or false, with probabilities p and 1-p, respectively. * * @param {Number} p - The probability of a 'true' result. *
src/RandGen.js:48
↓ 16 callers
Method
_addLink
* Adds a link to the Slipnet. * * @private
src/Slipnet.js:263
↓ 16 callers
Method
create
* Creates a codelet given its name and constructor arguments. * * @param {string} name - The name of the codelet. * @param {Number}
src/Codelets/CodeletFactory.js:34
↓ 16 callers
Method
post
* Adds a new codelet to the coderack. If the coderack is full, * it will remove an old codelet to make room. *
src/Coderack.js:59
↓ 15 callers
Method
weightedChoice
* Returns a random element from the given sequence, * with weighted probabilities. * * @param {Indexable} seq - The sequence to se
src/RandGen.js:75
↓ 13 callers
Method
updateStrength
* Updates the total strength value. *
src/Rule.js:131
↓ 12 callers
Method
_addSymmetricLinks
* Links a pair of nodes bi-directionally. * * @private
src/Slipnet.js:275
↓ 12 callers
Method
getDescriptor
* Gets the descriptor of this object that matches a given * description type. * * @param {SlipNode} descriptionType - The descript
src/WorkspaceObject.js:230
↓ 12 callers
Method
set
* Sets the temperature to the given value, unless we * are currently clamped, in which case the value is cached. * * @param {Number
src/Temperature.js:51
↓ 11 callers
Method
getAdjustedProb
* Ajusts the given probability value based on the current temperature. * If the temperature is 0, no adjustment is made. Otherwise, values
src/Temperature.js:104
↓ 11 callers
Method
getRelatedNode
* Returns the node that is linked to this one * via a link that is labeled by the given relation. * If no such node is found, returns nul
src/SlipNode.js:310
↓ 11 callers
Method
getUrgencyBin
* Returns a quantized measure of urgency. * * @param {Number} urgency - The input urgency.
src/Codelets/CodeletUtils.js:20
↓ 11 callers
Method
relevantDescriptions
* Gets the fully-active descriptions of the object. *
src/WorkspaceObject.js:196
↓ 10 callers
Method
break
* Removes the Rule from the workspace. *
src/Rule.js:69
↓ 9 callers
Method
chooseUnmodifiedObject
* Returns a random object from a given list, that is * not from the modified string. The probability of * choosing an object is weighted by
src/Codelets/CodeletUtils.js:39
↓ 8 callers
Method
_setState
* Sets our state and notifys listeners. * @private *
src/Copycat.js:254
↓ 8 callers
Method
build
* Adds the Rule to the workspace, replacing any pre-existing one. *
src/Rule.js:55
↓ 8 callers
Method
getAdjustedValue
* Adjusts the given value according to the current temperature. * (The value is raised to a power that decreases with temperature.) *
src/Temperature.js:90
↓ 8 callers
Method
getStringGraphic
* Gets the StringGraphic object for a specified string. * * @param {WorkspaceString} wstring - The string to search on.
src/UI/WorkspaceUi.js:76
↓ 8 callers
Method
hasDescriptor
* Indicates whether this object is described by a given descriptor. * * @param {SlipNode} sought - The descriptor to test against.
src/WorkspaceObject.js:218
↓ 8 callers
Method
isDistinguishing
* Indicates whether this object's descriptors uniquely identify its objects. *
src/ConceptMapping.js:122
↓ 8 callers
Method
isFullyActive
* Indicates whether this node is fully active. *
src/SlipNode.js:144
↓ 8 callers
Method
reset
* Resets copycat to its initial state *
src/Copycat.js:186
↓ 7 callers
Method
value
* Returns the current temperature value. *
src/Temperature.js:40
↓ 6 callers
Method
applySlippages
* Iterates through a given set of ConceptMappings, applies the first one * that pertains to to this node, and returns the resulting slipped node
src/SlipNode.js:355
↓ 6 callers
Method
flash
* Flashes a graphic a specified number of times. * * @param {Graphic} graphic - The graphic to flash. * @param {Number} flashCount
src/UI/Flasher.js:46
↓ 6 callers
Method
flashGrope
* Flashes a potential-Bond graphic. * * @param {Correspondence} bond * @param {Number} count
src/UI/BondsGraphic.js:138
↓ 6 callers
Method
getBondCategory
* Returns the label of the downstream link between this node and * a given one, or null if there is no such link. * * @param {Slip
src/SlipNode.js:332
↓ 6 callers
Method
getChildGraphic
* Gets the LetterGraphic or GroupGraphic associated with * a given Letter or Group. * * @param {Letter|Group} wrappedObject - The s
src/UI/StringGraphic.js:63
↓ 6 callers
Method
proposeGroup
* Posts a group-strength-tester codelet for a Group with * the given attributes. *
src/Coderack.js:364
↓ 6 callers
Method
warn
* Reports a warning message.
src/ConsoleReporter.js:33
↓ 5 callers
Method
_sameReferents
* Utility method that indicates whether two Bonds * refer to the same source and destination objects. * @private
src/UI/BondsGraphic.js:36
↓ 5 callers
Method
_sameReferents
* Utility method that indicates whether two Groups * refer to the same objects. * @private
src/UI/GroupsGraphic.js:35
↓ 5 callers
Method
_sameReferents
* Utility method that indicates whether two Correspondences * refer to the same initial and target objects. * @private
src/UI/CorrsGraphic.js:35
↓ 5 callers
Method
canSlip
* Indicates whether this mapping can actually produce a slippage. *
src/ConceptMapping.js:112
↓ 5 callers
Method
checkInputStrings
* Makes sure that all input strings are valid. * @private *
src/UI/CopycatUi.js:100
↓ 5 callers
Method
fightItOut
* Pits the given structure against the given list of incompatible * structures, deciding probabilistically on a winner. * * @param {Wo
src/Codelets/CodeletUtils.js:186
↓ 5 callers
Method
flashProposed
* Flashes a proposed-Bond graphic. * * @param {Bond} bond * @param {Number} count
src/UI/BondsGraphic.js:123
↓ 5 callers
Method
getMappings
* Gets a list of ConceptMappings between two given objects, * consistent with the given descriptions * * @param {WorkspaceObject} i
src/ConceptMapping.js:271
↓ 5 callers
Method
letterSpan
* Returns The number of letters in this object. *
src/WorkspaceObject.js:141
↓ 5 callers
Method
update
* Decays, spreads, and updates all the node activations. * * @param {RandGen} randGen - A randomness generator. * @param {Boolean}
src/Slipnet.js:58
↓ 4 callers
Method
_getCorrGraphic
* Gets or creates the graphic for a given correspondence. * @private
src/UI/CorrsGraphic.js:123
↓ 4 callers
Method
choice
* Returns a random element from a given sequence. * * @param {Indexable} seq - The sequence to select from. * @returns A random ele
src/RandGen.js:60
↓ 4 callers
Method
degreeOfAssociation
* Returns a measure of the shortness of this link, or * of its label if it has one. *
src/SlipLink.js:59
↓ 4 callers
Method
flippedVersion
* Creates a Bond like this one, except that the source and * destination are swapped.
src/Bond.js:107
↓ 4 callers
Method
getScoutSource
* Randomly selects an object from the initial or target string that * matches the given criterion. * * @param {Copycat} ctx - The Copy
src/Codelets/CodeletUtils.js:70
↓ 4 callers
Method
getSlippableMappings
* Gets all the concept mappings in the workspace that permit slippage. *
src/Workspace.js:132
↓ 4 callers
Method
isDistinguishingDescriptor
* Indicates whether the given descriptor uniquely identifies this Group * among all Groups in the parent string. * * @param {SlipNo
src/Group.js:212
↓ 4 callers
Method
isWithin
* Indicates whether the object is contained within another object. * * @param {WorkspaceObject} other - The object to test against.
src/WorkspaceObject.js:162
↓ 4 callers
Method
proposeBond
* Posts a bond-strength-tester codelet for a bond with * the given attributes. *
src/Coderack.js:296
↓ 4 callers
Method
redraw
* Updates the UI. *
src/UI/SlipnetUi.js:70
↓ 3 callers
Method
_addCategoryInstanceLinks
* Creates links between an (instance, category) pair. * * @private
src/Slipnet.js:287
↓ 3 callers
Method
_codeletLoop
* Runs the next codelet and schedules a subsequent one. * @private
src/Copycat.js:206
↓ 3 callers
Method
_getBondGraphic
* Gets or creates the graphic for a given bond. * @private
src/UI/BondsGraphic.js:100
↓ 3 callers
Method
_getGroupGraphic
* Gets or creates the graphic for a given group. * @private
src/UI/GroupsGraphic.js:99
↓ 3 callers
Method
activate
* Sets the activation buffer of all the Rule's nodes to 100. *
src/Rule.js:83
↓ 3 callers
Method
bondDegreeOfAssociation
* Returns the degree of association that bonds of this * node's category are considered to have. *
src/SlipNode.js:261
↓ 3 callers
Method
chooseBondFacet
* Randomly selects a bond facet that is common to the * given source and destination objects. * * @param {Copycat} ctx - The Copycat
src/Codelets/CodeletUtils.js:124
↓ 3 callers
Method
clearTable
* Clears the results table. *
src/UI/BatchmodeUi.js:275
↓ 3 callers
Method
getEquivalentGroup
* Seeks a Group in the string that matches a given group. * * @param {Group} sought - The Group to match.
src/WorkspaceString.js:112
↓ 3 callers
Method
isRelevant
* Indicates whether this mapping's descriptions are fully active. *
src/ConceptMapping.js:195
↓ 3 callers
Method
reset
* Resets all nodes to their initial states. *
src/Slipnet.js:41
↓ 3 callers
Method
sameAs
* Indicates whether this Rule is the same (by value) as another one. * * @param {Rule} other - The Rule to compare with.
src/Rule.js:105
↓ 2 callers
Method
_addTableRow
* Adds a new row to the results table. *
src/UI/BatchmodeUi.js:247
↓ 2 callers
Method
_createChildGraphics
* Creates the child graphics objects. * @private *
src/UI/StringGraphic.js:45
↓ 2 callers
Method
_degreeOfAssociation
* Returns a measure of the degree of association between the two * descriptors. * * @private
src/ConceptMapping.js:92
↓ 2 callers
Method
_getEventCoordinates
* Gets the coordinates from a given event. * @private * * @param {Event} event - Event info. *
src/UI/Dialog.js:217
↓ 2 callers
Method
_hasStringSpanningGroups
* Utility method that indicates whether a Correspondences * is between two string-spanning groups. * @private
src/UI/CorrsGraphic.js:45
↓ 2 callers
Method
_howManyToPost
* Computes the number of codelet of a given type to post. * * @private
src/Coderack.js:242
↓ 2 callers
Method
_localSupport
* Returns a measure of how much this group is supported * by other similar Groups in the parent string. * * @private
src/Group.js:261
↓ 2 callers
Method
_numberOfLocalSupportingGroups
* Gets the number of groups in the parent string that are outside * this group but have the same category and direction as this group. *
src/Group.js:279
↓ 2 callers
Method
_probabilityOfPosting
* Computes the probabilty of posting a given codelet type. * * @private
src/Coderack.js:212
↓ 2 callers
Method
_sameNeighbors
* Checks whether two bonds have the same neighbors. * @private *
src/Codelets/BondBuilder.js:97
↓ 2 callers
Method
_updateStringFromWorkspace
* Check whether the wrapped string has changed. * @private *
src/UI/StringGraphic.js:107
↓ 2 callers
Method
break
* Removes the Correspondence from its assigned objects and from the * workspace.
src/Correspondence.js:104
↓ 2 callers
Method
calcTemperature
* Updates the string unhappiness values and then uses them to * calculate the current workspace temperature. *
src/Workspace.js:105
↓ 2 callers
Method
category
* Returns the category that this node belongs to, if any. * For example, "leftmost" belongs to the string-position category. * (In the
src/SlipNode.js:238
↓ 2 callers
Method
chooseAndRunCodelet
* Runs a randomly chosen codelet from the coderack. * The choice is weighted by urgency and temperature. * If the coderack is empty, it wi
src/Coderack.js:77
↓ 2 callers
Method
chooseNeighbor
* Returns a random nearest-neighbor of a given object. * * @param {Copycat} ctx - The Copycat instance. * @param {WorkspaceObject} sou
src/Codelets/CodeletUtils.js:54
↓ 2 callers
Method
clampHigh
* Sets the node's activation to 100, and clamps it there. *
src/SlipNode.js:154
↓ 2 callers
Method
displayMessage
* Displays a message beneath the input widgets. *
src/UI/InputUi.js:153
↓ 2 callers
Method
getCodeletRunProbabilities
* Calculates the probability of running each codelet, based * on its urgency and the current temperature. *
src/Coderack.js:117
↓ 2 callers
Method
getInputStrings
* Returns the strings that are currently entered in the * input fields. *
src/UI/InputUi.js:136
↓ 2 callers
Method
hide
* Hides the dialog. *
src/UI/Dialog.js:119
↓ 2 callers
Method
isBeside
* Indicates whether this object is beside another object. *
src/WorkspaceObject.js:183
↓ 2 callers
Method
isClampedHigh
* Indicates whether this node's activation is locked at 100. *
src/SlipNode.js:175
↓ 2 callers
Method
isIdle
* Indicated whether the animation loop is idle. *
src/UI/Flasher.js:64
↓ 2 callers
Method
isIncompatibleWith
* Indicates whether this mapping is incompatible with another one. * * @param {ConceptMapping} other - The mapping to check.
src/ConceptMapping.js:219
↓ 2 callers
Method
isMiddleObject
* Indicates whether this object is the middle object in its string. *
src/WorkspaceObject.js:254
↓ 2 callers
Method
isRelatedTo
* Indicates whether either of this mapping's descriptors is * linked to the corresponding descriptor in another mapping. * * @par
src/ConceptMapping.js:207
↓ 2 callers
Method
letterDistance
* Returns the distance, in nmber of letters, between this object * and another. * * @param {WorkspaceObject} other - The object to
src/WorkspaceObject.js:288
↓ 2 callers
Method
pause
* Pauses copycat. *
src/Copycat.js:137
↓ 2 callers
Method
proposeCorrespondence
* Posts a correspondence-strength-tester codelet for a Correspondence with * the given attributes. *
src/Coderack.js:337
↓ 2 callers
Method
proposeDescription
* Posts a description-strength-tester codelet for a Description with * the given attributes. *
src/Coderack.js:318
↓ 2 callers
Method
proposeRule
* Posts a rule-strength-tester codelet for a Rule with * the given attributes. *
src/Coderack.js:392
↓ 2 callers
Method
redraw
* Updates the UI. *
src/UI/WorkspaceUi.js:113
↓ 2 callers
Method
redraw
* Updates the UI. *
src/UI/WorkspaceHeaderUi.js:241
↓ 2 callers
Method
redraw
* Updates the UI. *
src/UI/CoderackUi.js:69
next →
1–100 of 381, ranked by callers