edbond / angrygo

Solver for angry birds puzzle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

codecov

Go Report Card

Description

The code is example of brute force solver for angry birds puzzle. Puzzle consists of a board and four figures. Board contains images of pigs, figures should be positioned on board to hide pigs. Challenge list pigs that should be left uncovered.

Board

Board

Figures

Figures

Challenge

Challenge

Pigs

A Angry

B Beaten

H Hat

P Pig

R Red

S Sleepy

Example output

Running /usr/bin/time -lp ./angrybirds

....
Left on board map[B:1 S:2 A:1 R:1]
Left on board map[H:1 A:2 S:2]
Left on board map[H:1 B:1 P:1 R:1 S:1]
Left on board map[H:1 P:2]
Found solution!
VVP
VVXXX
VZXYX
HZYYP
ZZZYY
Total variants checked: 2333550
Total valid variants: 200
real         4.46
user         4.73
sys          0.14
   7770112  maximum resident set size```

About

Solver for angry birds puzzle


Languages

Language:Go 98.1%Language:Shell 1.9%