Web based Multiplayer Minesweeper with AI Solver

Saurabh Sukhatankar

Saurabh Sukhatankar

Bengaluru, Karnataka

1 0
  • 0 Collaborators

It’s a handy Web-Application to play the Minesweeper game. It facilitates users with Single Player and Multiplayer mode. The application also incorporates effective use of AI to provide hint or solve the game. ...learn more

Project status: Published/In Market

Artificial Intelligence

Code Samples [1]

Overview / Usage

This project is a Web-based Multiplayer Minesweeper with AI Solver. The application facilitates users to play the minesweeper game in both single player and multiplayer mode via any web-browsers in Desktop and Mobile Devices.

The following are the key product features -

  • Web Application accessible via Internet through DESKTOP and MOBILE devices
  • DIFFICULTY LEVELS – Beginner(8x8), Intermediate(16x16), Expert(24x24) and Customize your own board
  • Flag counter, Timer, Scoreboard and skinnable Board Interface for multiple players
  • LEADERBOARD displaying TOP 50 players’ scores _ _
  • MULTIPLAYER Minesweeper Real-time Gameplay with multiple Game Lobbies
  • “HINT” Feature enabled for Single Player Mode to ask for hint when stuck in the game
  • “VS BOT” Feature facilitates user to Play Against Computer Bot
  • “AUTO SOLVE” Feature to solve the Minesweeper completely from scratch
  • “CHAT ROOM” as a discussion platform for players to have Fun and Enjoy!

Methodology / Approach

The Application can be hosted over the internet by deploying over Cloud Application Platform like Heroku. The User Interface of the Game Application is on the client side while the Game, Game Board Configuration and Player Connection Dependent logic resides on the server side of the application.

The bi-directional messaging between the client and server occurs through web-socket protocol. An advanced API on top of web-socket protocol viz. socket.io facilitates real-time communication between multiple clients and server in multiplayer gameplay. The AI and leaderboard logic resides on the server too. For auto-solving the minesweeper CSP or Rule-based approach is used. This ensures likelihood of placing a flag or revealing the squares based on number of squares unrevealed, number of mines and number of flags marked in the neighborhood of the neighbor of the cell under consideration. Every action generated on the client side is handled at the server.

The game provides AI hint feature to provide the hint to the user. Moreover, this feature can be triggered until a definite result is obtained to provide the "Autosolve" feature for the user. The game is majorly programmed in HTML/CSS, JavaScript. Node.js and Express.js are JavaScript runtime libraries use to provide scalability in multi-user mode.

Technologies Used

The technology stack used during the application development was as follows -

  • Client Side – HTML, CSS, JavaScript, Bootstrap
  • Server Side – Node.js, Express.js
  • Communication Protocol – socket.io (Advanced API – Web Socket Protocol)
  • AI algorithm – Rule based or CSP Algorithm
  • Heroku – Deployment
  • Testing libraries/frameworks – chai, mocha
  • Gitlab - Version control

Repository

https://github.com/SukhatankarSV/Multiplayer-Minesweeper-with-AI-Solver

Comments (0)