We create an agent that intelligently solves levels for the game 'Baba Is You' based on the KekeCompetition framework created by M Charity.
Contributors: Tyler Olson, Adam Albanese, Arman Rafian, Gregory Hastings
Framework for the Keke Competition - an AI competition for the puzzle game 'Baba is You'. This version uses the JS implementation originally found on the Baba is Y'all website
- NodeJS
- Web-browser (preferably Google Chrome)
- Terminal
- A text editor (for creating agents)
- lodash (A JavaScript library containing thousands of useful functions)
- Clone this repository to your local machine
- Download and install the package manager NodeJS
- Run the command
npm installto install the necessary packages found in the package-lock.json file
- Run the command
node index-server.js. - In a browser, go to the URL
localhost:8080Note: this port number can be changed on line 15 in the index-server.js file
- To enable Auto Attach feature, from the Command Palette (Ctrl+Shift+P) type
Toggle Auto Attach. Select the optionOnly With Flag, the flag being--inspect. - Now to run the server with the debugger, simply do the same but with the flag:
node --inspect index-server.js
- Our agent in implemented in
js_AGENT.js. To create a new agent, copy theempty_AGENT.jsfile and rename it with the following convention:[NAME]_AGENT.py. - Modify the
step()andinit()functions in the agent code. - In the evaluator app on your browser, select your agent from the dropdown on the right
- Select the level set you want to test on from the dropdown on the right
- Press 'Run Agent' to evaluate the levels from the selected level set
For more information, check the competition wiki
In order to maintain project readability, we use the following style checkers and linters.
In your editor of choice, enable format on save so that linting is
done automatically.
For VSCode, add the following to .vscode/settings.json:
{
"editor.defaultFormatter": null,
"editor.formatOnSave": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.tabWidth": 4
}
}To install ESLint and Prettier, run the following command:
npm install --save-dev eslint prettier eslint-config-prettier eslint-plugin-prettier husky lint-staged
The following Prettier options are modified from their default value:
| Option | Description |
|---|---|
"jsxBracketSameLine": true |
Put the > of a multi-line JSX element at the end of the last line instead of being alone on the next line (does not apply to self closing elements). |
"endOfLine": "auto" |
Maintain existing line endings (mixed values within one file are normalized by looking at what’s used after the first line). |