
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
parse-grid-bench
Advanced tools
Parses the data files from Nathan Sturtevant's grid path finding benchmark.
var fs = require('fs')
var path = require('path')
var imshow = require('ndarray-imshow')
var parseMap = require('../map')
var parseScen = require('../scenario')
//Read in data
var mapStr = fs.readFileSync('./maps/bg512/AR0011SR.map', 'utf-8')
var scenStr = fs.readFileSync('./scenarios/bg512/AR0011SR.map.scen', 'utf-8')
console.log(parseScen(scenStr))
imshow(parseMap(mapStr))
[ { bucket: 61,
map: 'maps/bgmaps/AR0011SR.map',
width: 512,
height: 512,
srcX: 210,
srcY: 395,
dstX: 87,
dstY: 201,
length: 244.95 },
{ bucket: 33,
map: 'maps/bgmaps/AR0011SR.map',
width: 512,
height: 512,
srcX: 244,
srcY: 370,
dstX: 359,
dstY: 376,
length: 132.4 },
...
]
npm i parse-grid-bench
var map = require('parse-grid-bench/map')(mapStr)Parses a map file from a string
mapStr is a string containing the map dataReturns An ndarray representing the map data. Each entry in the map file has the following meaning:
0 free terrain1 impassable terrain/obstacle2 swamp3 watervar scen = require('parse-grid-bench/scenario')(scenStr)Parses a scenario file.
scenStr is a string containing the scenarioReturns An array of scenario data. Each scenario has the following properties:
bucket A random number, ignore itmap A path to the map data for the scenario.width the width of the map data in the map stringheight the height of the map data in the map stringsrcX the start X positionsrcY the start Y positiondstX the goal X positiondstY the goal Y positionlength the optimal path length, assuming diagonal motion allowed(c) 2015 Mikola Lysenko. MIT License
FAQs
Parses grid path finding benchmark data
We found that parse-grid-bench demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.