A simple bot for playing the 1D PAC-MAN game PakuPaku by ABA Games with a high score of 1M+.
- A refactored version of the original game
- An interface for writing your own bot
- 2 bot strategies:
creme332Strategy
andAnotherGoodNameStrategy
.
🔴 Requirements: Git, Node.js
Clone repository:
git clone git@github.com:creme332/pakupaku-ai.git
Install dependencies:
cd pakupaku-ai
npm install
To run bot:
npm run start
Open http://localhost:4000/?pakupaku in your browser then tap on the screen once to start the game. You can press Enter
to end the game at any time.
🟢 Tip: You can paste the code in
bot.js
directly into the console of the original game.
The default bot strategy used is creme332Strategy
. You can easily create your own bot by creating your strategy function inside botController
and then calling it in the main
function.
All code for the bot is found in docs/pakupaku/bot.js
.
The creme332Strategy
has several limitations:
-
It cannot consistently achieve the highest score.
-
It can end up in a situation where it takes a very long time to eat the dots in the middle:
-
It can move too close to an enemy when power is about to expire:
The following limitations are no longer present in the current version of creme332Strategy
but might be useful when building your own bot:
- add ability to increase game speed with keyboard
- add ability to pause game on key press
This repository includes code/content under various licenses:
- Code from
docs/pakupaku/main.js
is under the MIT License (see LICENSE-A) - Code from
docs/pakupaku/bot.js
is under the MIT License (see LICENSE)
- Code for pakupaku game: https://abagames.github.io/crisp-game-lib-11-games/pakupaku/main.js
- Other bot algorithms: https://news.ycombinator.com/item?id=38845510