Inspiration

In the game “Keep Talking and Nobody Explodes”, the object of the game is to defuse a bomb before the timer runs out. The bomb is made up of several individual modules, each with specific rules and instructions on how to disarm them. One player acts as the expert that feeds instructions to another player acting as the bomb defuser. Since the instructions follow a set of rules from a manual, we wondered if it was possible to replace the “expert” entirely with an AI.

What it does

The AI takes information about a bomb module, and following the set of rules, provides an instruction as to how to disarm it. It is able to handle the Wires, Complicated Wires, Wire Sequences, Password, and Simon Says modules.

How we built it

We used Prolog and s(CASP). We wrote our code locally and tested it on the cslinux1 server. We also took advantage of Codeshare so that we could both work simultaneously on the same program at times. Additionally, we also received some help from the mentors on the HackReason discord.

Challenges we ran into

Since we were both relatively new to Prolog and s(CASP), so getting started was somewhat difficult. There was a bit of an adjustment period learning s(CASP) and its differences to Prolog. In addition, some bomb modules were not well suited for a s(CASP) implementation, so it was not feasible to implement each module’s solution.

Accomplishments that we're proud of

We were able to fully implement 5 different modules, each of which is able to handle any situation a diffuser could encounter. The programs have survived rigorous testing and perform as expected with any potential input.

What we learned

Working on the first module together before dividing work was very helpful to our workflow. By encountering and solving common problems together, it allowed us to save time when we started working alone. We also wrote each module in such a way that reuses useful subroutines that we already wrote like append, member, and listIndex.

What's next for Bomb Defusal

As of now, the solvers require all potentially relevant information upfront. In the future we could add user input to only ask for the necessary information as needed. In addition, some modules only print the instruction to the user, we could improve the program to bind solutions to a variable so that the modules could be combined easily to create a general solver.

Built With

  • s(casp)
Share this project:

Updates