MCPcopy Create free account

hub / github.com/GregoryCannon/StackRabbit / functions

Functions215 in github.com/GregoryCannon/StackRabbit

↓ 38 callersFunctionmaybePrint
src/cpp_modules/src/utils.hpp:37
↓ 22 callersFunctiongetTestBoardWithHeight
(height: number)
src/server/board_helper.ts:194
↓ 17 callersFunctioncanDoPlacement
( board: Board, level: number, pieceId: string, rotationIndex: number, xOffset: number, inputFrame
src/server/move_search.ts:570
↓ 11 callersFunctionmainProcess
src/cpp_modules/src/main.cpp:37
↓ 11 callersFunctionpieceCollision
( board: Board, x: number, y: number, piece: PieceArray )
src/server/board_helper.ts:9
↓ 10 callersFunctionprintBoard
src/cpp_modules/src/utils.hpp:57
↓ 9 callersFunctioncollision
* Checks for collisions with the board and the edges of the screen */
src/cpp_modules/src/move_search.cpp:17
↓ 8 callersFunctiongetPieceRangeContext
src/cpp_modules/src/piece_ranges.cpp:52
↓ 7 callersFunctionadvanceGameState
Gets the game state after completing a given move */
src/cpp_modules/src/move_result.cpp:332
↓ 7 callersFunctionformatPlayout
src/cpp_modules/src/formatting.hpp:89
↓ 7 callersFunctiongetPossibleMoves
( startingBoard: Board, currentPieceId: PieceId, level: number, existingXOffset: number, existingYOf
src/server/move_search.ts:49
↓ 7 callersFunctionisAnyOf
(str, possible)
src/server/precompute.ts:384
↓ 7 callersFunctionverifyNumMoves
(pieceId, expectedLength)
src/server/move_search_test.ts:12
↓ 6 callersFunctionGetGravity
(level)
src/server/utils.ts:37
↓ 6 callersFunctiongetPlayoutScore
src/cpp_modules/src/playout.cpp:120
↓ 5 callersFunction_modulus
(n: number, m: number)
src/server/board_helper.ts:189
↓ 5 callersFunction_validateIntParam
(value: number, min: number, max: number)
src/server/board_helper.ts:98
↓ 5 callersFunctiongenerateInputFrameTimeline
(delaySequence: Array<number>)
src/server/utils.ts:166
↓ 5 callersFunctiongetLineClearFactor
src/cpp_modules/src/eval.cpp:260
↓ 5 callersFunctiongetStackRabbitArgString
(args)
src/wasm/wasmRabbit-worker.js:22
↓ 5 callersFunctionpartiallySortPossibilityList
* Performs a partial insertion sort such that the highest N elements of the list are guaranteed to be sorted and kept at the front of the list. * The
src/cpp_modules/src/high_level_search.cpp:16
↓ 4 callersFunctionIsGravityDoubled
(level)
src/server/utils.ts:27
↓ 4 callersFunctiondebugPrint
src/cpp_modules/src/utils.hpp:47
↓ 4 callersFunctionfastEval
src/cpp_modules/src/eval.cpp:428
↓ 4 callersFunctionformatPossibility
( possibility: PossibilityChain, shouldPushDown = false )
src/server/utils.ts:121
↓ 4 callersFunctiongetCppEncodedInputString
( searchState: SearchState, urlArgs: UrlArguments )
src/server/request_parser.ts:233
↓ 4 callersFunctiongetEvalContext
src/cpp_modules/src/eval_context.cpp:52
↓ 4 callersFunctionmoveSearch
src/cpp_modules/src/move_search.cpp:428
↓ 4 callersFunctionplacementIsLegal
( goalRotationIndex: number, goalOffsetX: number, simParams: SimParams, shouldLog: boolean = false,
src/server/move_search.ts:600
↓ 4 callersFunctionprintBoardWithPiece
src/cpp_modules/src/utils.hpp:70
↓ 4 callersFunctionrepeatedlyShiftPiece
* Helper function that shifts a hypothetical piece as many times as it can in * each direction, before it hits the stack or the edge of the screen.
src/server/move_search.ts:434
↓ 4 callersFunctionsearchDepth2
Searches 2-ply from a starting state, and performs a fast eval on each of the resulting states. * @returns an UNSORTED list of evaluated possibiliti
src/cpp_modules/src/high_level_search.cpp:88
↓ 4 callersFunctionshouldPerformInputsThisFrame
* Given a string such as X.... that represents a loop of which frames are allowed for inputs, * determines if a given frame index is an input frame
src/cpp_modules/src/utils.hpp:193
↓ 4 callersFunctionshouldPerformInputsThisFrame
( inputFrameTimeline: string, frameNum: number )
src/server/utils.ts:153
↓ 3 callersFunctiondebugLog
(simState: SimState, simParams: SimParams, reason: string)
src/server/dfs.ts:247
↓ 3 callersFunctionencodeLockPosition
Concatenates the position of a piece into a single string. * * NB: differs from formatLockPosition by the order of the values and the X coordinate
src/cpp_modules/src/formatting.hpp:15
↓ 3 callersFunctionexploreHorizontally
* Explores how far in a given direction a piece can be shifted, and registers all the legal placements along * the way */
src/cpp_modules/src/move_search.cpp:61
↓ 3 callersFunctionformatLockPosition
Formats a human-readable lock location */
src/cpp_modules/src/formatting.hpp:34
↓ 3 callersFunctiongetBoardAndLinesClearedAfterPlacement
( board: Board, currentRotationPiece: PieceArray, x: number, y: number )
src/server/board_helper.ts:67
↓ 3 callersFunctiongetPossibilityFromSimState
( simState: SimState, simParams: SimParams, inputSequence: string, inputCost: number )
src/server/move_search.ts:293
↓ 3 callersFunctiongetSearchStateAfter
( prevSearchState: SearchState, possibility: Possibility )
src/server/move_search.ts:20
↓ 3 callersFunctiongetSurfaceArray
src/cpp_modules/src/utils.hpp:144
↓ 3 callersFunctiongetTopMoveList
* Gets a list of the top moves, formatted as a JSON string. (See formatting.hpp for exact format details). */
src/cpp_modules/src/high_level_search.cpp:319
↓ 3 callersFunctiongetWeights
src/cpp_modules/src/params.hpp:143
↓ 3 callersFunctioninsertIntoList
Performs the insertion operation from insertion sort. */
src/cpp_modules/src/utils.hpp:261
↓ 3 callersFunctionrunCommand
(command, args, label)
install.js:3
↓ 3 callersFunctionsearchDepth1
Searches 1-ply from a starting state, and performs an eval on each resulting state. * @returns an UNSORTED list of evaluated possibilities */
src/cpp_modules/src/high_level_search.cpp:60
↓ 3 callersFunctionsearchForTucksOrSpinsInternal
( potentialTuckSpinStates: Array<DFSState>, simParams: SimParams, lockHeightLookup: Map<string, number>,
src/server/dfs.ts:99
↓ 3 callersFunctionupdateSurfaceAndHoles
* Manually finds the surface heights and holes after lines have been cleared (since usual prediction tricks * don't apply). * @param excludeHolesCol
src/cpp_modules/src/move_result.cpp:209
↓ 2 callersMethod_wrapAsync
(func)
src/server/request_handler.ts:121
↓ 2 callersFunctionanalyzeHole
* Rates a hole from 0 to 1 based on how bad it is. * Ignore all but the most permissible of tuck setups while digging. * --Side effect-- marks the h
src/cpp_modules/src/move_result.cpp:10
↓ 2 callersFunctioncomputeYValueOfEachShift
* Calculates a lookup table for the Y value you'd be at while doing shift number N. * This is used in the tuck search, since this would be the first
src/cpp_modules/src/piece_ranges.cpp:33
↓ 2 callersFunctioncopyBoard
src/cpp_modules/src/utils.hpp:138
↓ 2 callersFunctioncountInputs
(placement)
src/server/precompute.ts:403
↓ 2 callersFunctiondebugLog
(simState: SimState, simParams: SimParams, reason: string)
src/server/move_search.ts:800
↓ 2 callersFunctionencodeBoard
src/cpp_modules/src/utils.hpp:124
↓ 2 callersFunctionevalForPerfectPlay
Custom evaluation function designed for perfect play. The score it returns is aimed to emulate the percent chance of maintaining a perfect board throu
src/cpp_modules/src/eval.cpp:365
↓ 2 callersFunctionformatBoard
Formats a board using a simple proprietary compression/encoding system. * * Example compressed board: * 15,CaEa,3 * * - The first number is the
src/cpp_modules/src/formatting.hpp:59
↓ 2 callersFunctionformatPrecomputeResult
(results, defaultPlacement)
src/server/precompute.ts:356
↓ 2 callersFunctiongetAverageHeight
src/cpp_modules/src/eval.cpp:80
↓ 2 callersFunctiongetGravity
src/cpp_modules/src/utils.hpp:176
↓ 2 callersMethodgetMoveSync
* Synchronously choose the best placement, with no next box and no search. * @returns {string} the API response
src/server/request_handler.ts:143
↓ 2 callersFunctiongetRandomPiece
(prevPieceIndex)
src/browser_test_site/index.js:50
↓ 2 callersMethodhandlePrecomputeRequest
* Pre-compute both an initial placement and all possible adjustments for the upcoming piece. * @returns {string} the API response
src/server/request_handler.ts:215
↓ 2 callersFunctionisGravityDoubled
src/cpp_modules/src/utils.hpp:185
↓ 2 callersFunctionlockLocationEquals
src/cpp_modules/src/utils.hpp:256
↓ 2 callersFunctionlogBoard
(board)
src/server/utils.ts:278
↓ 2 callersFunctionmoveSearchInternal
* Main move search implementation. * Wrapped in two parent functions depending on whether the move search is from standard spawn or from a midair adj
src/cpp_modules/src/move_search.cpp:350
↓ 2 callersFunctionparseBoard
(boardStr: string)
src/server/utils.ts:237
↓ 2 callersFunctionperformSimulationRotation
( goalRotationIndex: number, simState: SimState, board: Board, rotationsList: Array<PieceArray> )
src/server/move_search.ts:752
↓ 2 callersFunctionperformSimulationShift
( xIncrement: number, simState: SimState, board: Board, currentRotationPiece: PieceArray )
src/server/move_search.ts:723
↓ 2 callersFunctionpixelIsBlack
(frame, x, y)
src/console_client/video_capture.py:6
↓ 2 callersFunctionplayOneMove
Plays one move from a given state, with or without knowledge of the next box.*/
src/cpp_modules/src/high_level_search.cpp:138
↓ 2 callersFunctionpredictSearchStateAtAdjustmentTime
( initialState: SearchState, inputSequence: string, inputFrameTimeline: string )
src/server/precompute.ts:431
↓ 2 callersFunctionqualityRandom
src/cpp_modules/src/utils.hpp:294
↓ 2 callersFunctionsendFrames
(frames)
src/console_client/naive_agent.py:57
↓ 2 callersFunctionsimulateGames
()
src/browser_test_site/index.js:123
↓ 2 callersFunctionsleep
(ms)
src/server/request_handler.ts:12
↓ 1 callersFunctionGetGravityPAL
(level)
src/server/utils.ts:73
↓ 1 callersMethod_calculatePhantomPlacements
( initialSearchState: SearchState, possibleMoves: Array<Possibility>, inputFrameTimeline: string
src/server/precompute.ts:139
↓ 1 callersMethod_compileResponseFinesse
()
src/server/precompute.ts:262
↓ 1 callersMethod_precompileAdjustmentMoves
()
src/server/precompute.ts:220
↓ 1 callersFunctionadjustmentSearch
src/cpp_modules/src/move_search.cpp:436
↓ 1 callersFunctioncTest
()
src/server/cmodules.ts:3
↓ 1 callersFunctioncalculateEntryDelayFrames
Calculate the ARE as a function of the "lock height" (the height of the highest cell in the piece)
src/server/move_search.ts:345
↓ 1 callersFunctioncalculateFlatness
* A crude way to evaluate a surface for when I'm debugging and don't want to load the surfaces every time I * run. */
src/cpp_modules/src/eval.cpp:15
↓ 1 callersFunctionclearLines
Clear all filled lines on a board * @returns the number of lines cleared
src/server/board_helper.ts:48
↓ 1 callersFunctiondebugLogResultBoard
(resultBoard)
src/console_client/naive_agent.py:190
↓ 1 callersFunctionexecuteInput
(inputChar)
src/console_client/raspberry_pi.py:47
↓ 1 callersFunctionexploreLegalPlacementsUntilLock
Starts with a set of states that are legal placements, but still have the piece hovering in the air. * Simulates letting them drop by gravity, and no
src/server/move_search.ts:170
↓ 1 callersFunctionexplorePlacementsHorizontally
* Calculates how far in each direction a hypothetical piece can be tapped (for each rotation), given the AI's tap speed and * the piece's current pos
src/server/move_search.ts:362
↓ 1 callersFunctionexplorePlacementsNearSpawn
* Explores for moves with more rotations than shifts (the only blind spot of the default exploration * behavior). */
src/cpp_modules/src/move_search.cpp:162
↓ 1 callersFunctionfetchPrecomputeResult
()
src/console_client/naive_agent.py:197
↓ 1 callersFunctionfindPlayerMove
* Finds the move out of a list of possibilities that has the resulting board equal to the player's resulting board. * NB: REMOVES THE ELEMENT FROM TH
src/cpp_modules/src/high_level_search.cpp:193
↓ 1 callersFunctionfindTuckInput
src/cpp_modules/src/move_search.cpp:236
↓ 1 callersFunctionfindTucks
Searches for tucks by 1) Finding all of the overhang cells from the board array, then 2) looping over the overhang cells and trying all the ways th
src/cpp_modules/src/move_search.cpp:300
↓ 1 callersMethodfinessePrecompute
( searchState: SearchState, shouldLog: boolean, inputFrameTimeline: string, onPartialResultCal
src/server/precompute.ts:73
↓ 1 callersFunctionformatEngineMoveList
* Formats a list of engine moves, for use in the "engine-movelist-cpp" API request. * The format is JSON-like, as follows: * "[ * { * firstP
src/cpp_modules/src/formatting.hpp:136
↓ 1 callersFunctionformatRateMove
src/cpp_modules/src/formatting.hpp:182
↓ 1 callersFunctiongenerateInputSequence
( rotationIndex, xOffset, inputFrameTimeline, framesAlreadyElapsed = 0 )
src/server/board_helper.ts:122
next →1–100 of 215, ranked by callers