Randy
Randy (aka Random Dot Range) is a JavaScript Neuro simulator that makes random choices when forced to do an action. This can be useful as a basic, low-latency testing tool to test your integrations.
You can also tell Randy to do an action by itself using a POST request to its HTTP endpoint.
Randy is maintained by alexvoid, and can be found here.
To set up Randy:
-
Clone the Neuro Game SDK repo:
Terminal window git clone https://github.com/VedalAI/neuro-game-sdk.git -
Navigate into the
Randysubdirectory:Terminal window cd neuro-game-sdk/Randy -
Install dependencies using your package manager:
Terminal window npm installTerminal window yarn installTerminal window pnpm install -
Start Randy using:
Terminal window npm run startTerminal window yarn run startTerminal window pnpm run start
Startup
Section titled “Startup”On startup, Randy occupies ports 8000 (WebSocket) and 1337 (HTTP) and will begin listening for packets.
Randy will immediately respond to actions/force packets with a random selection and mock data for the schema (if one is required). Otherwise, Randy will not respond or react to any packets (other than the registration and unregistration of actions).
If desired, you can make a POST request to Randy’s HTTP port to simulate Neuro manually selecting an action using the following example:
curl --request POST --url http://localhost:1337/ --header 'Content-Type: application/json' --data '{ "command": "action", "data": { "id": "blegh", "name": "join_friend_lobby", "data": "{"friend_name": "jerma985"}" }}'Known issues
Section titled “Known issues”- Randy sometimes won’t let go of his HTTP port when closing. You can fix this with the following command:
npx kill-port 1337yarn dlx kill-port 1337pnpx kill-port 1337# orpnpm dlx kill-port 1337