GithubHelp home page GithubHelp logo

h-tr / agent-decision-making Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 1.62 MB

The assignment for SC4003-CE4046-CZ4046-INTELLIGENT AGENTS focuses on Agent Decision Making, specifically in the context of a maze environment.

License: MIT License

Python 72.46% TeX 27.54%

agent-decision-making's Introduction

Maze Solver: Intelligent Agents Assignment 1

Python Tests

logo

Overview

This project is the first assignment for the SC4003-CE4046-CZ4046-INTELLIGENT AGENTS course. It involves implementing value iteration and policy iteration algorithms to solve a maze environment. The goal is to find the optimal policy and utilities for all non-wall states in the maze.

Results

The following section presents the results of the maze solver algorithm, showcasing the original maze configuration and the optimized policy obtained after running the algorithm.

Original Maze

The original maze is set up with walls, positive rewards, and negative rewards as shown below:

Original Maze

Optimized Policy

After running the maze solver algorithm, the optimized policy indicating the best actions at each state is visualized below:

Value iteration policy and utility:

Policy Utility
Value Iteration Policy Value Iteration Utility

Policy iteration policy and utility:

Policy Utility
Policy Iteration Policy Policy Iteration Utility

The arrows represent the direction of the optimal action to take from each non-wall grid cell. Green cells indicate positive rewards, orange cells indicate negative rewards, and gray cells represent walls. The optimized policy provides a guide for an agent to maximize rewards and reach the goal state efficiently.

The results denote both could converge to the same state.

For more details please check the report

Getting Started

Installation

  1. Clone the repository:

    git clone https://github.com/H-tr/Agent-Decision-Making.git
  2. Navigate to the project directory:

    cd Agent-Decision-Making

Usage

  1. Create the python environment

    conda create -n maze_solver python=3.10 -y
    conda activate maze_solver
    pip install -r requirements.txt
  2. Run the main logic

    To monitor the iteration progress

    tensorboard --logdir=runs
    python main.py

    For part 2:

    python main.py --assignment part_2
  3. Test

    python -m unittest tests.test_maze_solver

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Course instructors and teaching assistants for providing guidance and support.

agent-decision-making's People

Contributors

h-tr avatar

Stargazers

 avatar Han Shi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.