Skip to content
/ snake Public

A Snake game you can't play (to learn about fuzzing)

Notifications You must be signed in to change notification settings

fng97/snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fuzzy Snake

A simple Snake game (that you can't play) I wrote to learn about deterministic simulation testing (DST). Games are fully reproducible from a seed and commit. The fuzzer generates seeds, plays games to completion, and tracks the highest score. Inputs are biased towards good moves (prefer not dying, prefer moving towards food) to push games further along.

Here's what the best game looked like after 10 hours of fuzzing:

Replay of the best seed

One fun hack was how I kept track of seeds. The fuzzer prints the command to reproduce each new high score. Every replay I run gets saved to shell history so my fish history is the fuzzing database.

fish DB

DST Resources

About

A Snake game you can't play (to learn about fuzzing)

Resources

Stars

Watchers

Forks

Languages