█████████▄   ▄█        ▄██████▄     ▄██████▄  
   ███    ███ ███       ███    ███   ███    ███ 
   ███    ███ ███       ███    ███   ███    █▀  
  ▄███▄▄▄██▀  ███       ███    ███  ▄███        
 ▀▀███▀▀▀██▄  ███       ███    ███ ▀▀███ ████▄  
   ███    ██▄ ███       ███    ███   ███    ███ 
   ███    ███ ███▌    ▄ ███    ███   ███    ███ 
 ▄█████████▀  █████▄▄██  ▀██████▀    ████████▀ 

Where I post Projects, Lessons Learned... or anything, really!

| | | | |

Hunt The Wumpus!

[ 2019 Spring Semester ] - Making a Game with AI Assist

This was probably one of my favorite school projects, by a long shot! This one is much easier to show off than it is to explain, so the text part of this blog section will probably be rather short.

The topic wasn't too simple: "Create an interactive webpage that keeps score, state, etc per-user... and also makes use of another project of yours." For whatever reason, I took this as a challenge- and elected, of all things, to have my webpage make use of an AI I wrote for a game-theory/AI class.

The game's Name was "Hunt The Wumpus", and a simple version of its board-state is shown below.

The Wumpus Board

The Game-Theory Idea of "Hunt The Wumpus" we implemented was a simple one. You start, safely, in the bottom left of the board, and want to grab the gold that has spawned randomly in one of the rooms given.

The trick is that, also randomly spawned, is 1 killable Wumpus, and several pits- and you only get generic percepts to detect them- "you feel a breeze", "you smell a stinky Wumpus nearby"- you are given no direction for those percepts.

The hardest part, by a long shot, was getting the AI from C++ to Javascript with no weirdness happening. took a fair bit of learning JS "quirks!"

AI code

The Basic Idea was to have the bot check its percepts at the beginning of each turn, while marking each room it went through. "Safe/Unsafe/NewlySave", for example. If any room was deemed too risky, it would pop off of a stack and revert its steps, reconsidering old rooms where necessary.

Since the other half was web-design, we had to allow the player some control over difficulty, and we decided that toggling the AI, help-board, rules/hints was difficult enough! this was fairly easy to implement in JS through

The Main Menu

Toggleables

Play The Game Here!