Skip to content

A bot for playing the 1D PAC-MAN game PakuPaku by ABA Games with a high score of 1M+.

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE-A
Notifications You must be signed in to change notification settings

creme332/pakupaku-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pakupaku-ai 👾

A simple bot for playing the 1D PAC-MAN game PakuPaku by ABA Games with a high score of 1M+.

AI GIF

Screenshot of high score

badge badge

Features

  • A refactored version of the original game
  • An interface for writing your own bot
  • 2 bot strategies: creme332Strategy and AnotherGoodNameStrategy.

Installation

🔴 Requirements: Git, Node.js

Clone repository:

git clone git@github.com:creme332/pakupaku-ai.git

Install dependencies:

cd pakupaku-ai
npm install

Usage

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.

Create your own bot

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.

Limitations

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:

    bot taking a long time to eat middle dot

  • It can move too close to an enemy when power is about to expire:

    bot moving too close to enemy when power is about to expire

Fixed ✅

The following limitations are no longer present in the current version of creme332Strategy but might be useful when building your own bot:

  • It can move too close to the respawn point of the enemy and is unable to escape when enemy revives.

    bot moving too close to respawn point of enemy

To-do

  • add ability to increase game speed with keyboard
  • add ability to pause game on key press

Licenses

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)

References

About

A bot for playing the 1D PAC-MAN game PakuPaku by ABA Games with a high score of 1M+.

Topics

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE-A

Stars

Watchers

Forks