Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/dragon1672/grid-games

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/dragon1672/grid-games

  • v0.0.0-20210315010426-76945fefc66d
  • Source
  • Go
  • Socket score

Version published
Created
Source

Grid Games

Frame work and simple grid based games and writing AIs for those games

Flood it

Toggle between colors to convert the entire board to a single color

Max Area AI

Each turn tries to convert the most number of cells

Max Perimeter AI

Tries to maximize the perimeter. This gets in an infinite loop because it favors a fragmented board.

Lights out

When you every click toggles the block and the surrounding blocks

STATUS: Brute force AI

Minesweeper

It's minesweeper! try to not click a bomb

https://youtu.be/lj8SnL7TEZw

Snek

AI only game of snake. Gobble the apples and avoid hitting your own snake.

A* based AI: https://youtu.be/jHLq9kY-dYk

Pop it

"pop" a cell and remaining cells will drop down and to the left. You can only pop cells of 2 or more.

First Path Non Recursive

Returns the first valid path it can find. It favors moves that maximize possible future moves. The non recursive bit was me playing around with performance.

https://youtu.be/4NlQJ1bQlIc

Recursive Board Heuristic

Returns the first valid path it can find. It favors moves that maximize possible future moves.

The board heuristic could use some tweaking, to instead favor higher scoring moves.

https://youtu.be/bRS_RnodlTI

Recursive First Path

Does not favor any moves and just tries any possibility it can

https://youtu.be/gAUn8hRk9hc

Exhaustive AIs

The goal of these AIs is to determine the best possible game. Each version takes a stab at doing this in a reasonable time.

Exhaustive Recursive AI

This one is pretty bad, it saves all the possible states and then picks the best one.

This has never successfully solved a full board.

Exhaustive Iterative AI

This does a depth first search only saving the best resulting game. It will discard any moves that don't, or can't beat the current best game.

On a full board, this took about 3 hours.

Exhaustive Threaded AI

This is an attempt to thread a depth first search that discards results if they cannot beat the best possible game. This has a performance boost for small games, but on a full board, the iterative AI still has better performance.

Tests on a full board were stopped after 3 hours.

FAQs

Package last updated on 15 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc