Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 2.17 KB

README.md

File metadata and controls

22 lines (15 loc) · 2.17 KB

SmasHack: gotta smash 'em all! 👾

Developed by: the Hackward Hackers - Daniele Bedini, Francesca Poli, Gioele Modica and Giovanni Criscione
Course: Artificial Intelligence Fundamentals, a.y. 2023/2024
Master degree: Computer Science, Artificial Intelligence curriculum

The project is based on an intelligent agent that plays a custom level in the NetHack rogue game. The agent is inserted into a room, which is the environment it has to percept. The agent has to firstly pick up and wield a weapon, then kill all the monsters and, finally, finish the level exiting through the stairs and win.

The agent's aim is to use a searching algorithm to reach the desired targets one at a time, following the order previously listed: weapon, monsters, stairs. At each step of the agent, the heuristic will evaluate the best possible move, taking into consideration the targets' order and placement, and the agent's health level represented as hit points: the heuristic needs to predict all the possible scenarios and choose the one that seems to be the most convenient at the moment in order to take a step in one direction.

We solved this task by developing two different heuristics:

  • Tactical heuristic: the agent is told exactly what to do considering the percepts received in input and fed to the heuristic function in a more direct approach.
  • Greedy heuristic: the agent is guided by a system of priorities based off the percepts received in input, that converge into a weighted summation of all the targets' importance.

Repository structure

┣ 📄 heuristic_FD.py // python file containing the weighted sum heuristic
┣ 📄 heuristic_GG.py // python file containing the direct heuristic
┣ 📜 report.ipynb // jupyter notebook with in-depth explanations, compared results and statistics
┗ 📄 utils.py // python support file containing all the default background functions