GithubHelp home page GithubHelp logo

prmsvion / mapd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arka816/mapd

0.0 0.0 0.0 35 KB

multi agent path finding and pickup and delivery (combined task allocation and path finding)

Python 100.00%

mapd's Introduction

AIFA: Multi Agent Path Finding

The question in the assignment revolves around Multi Agent path Finding with pickup and delivery.

The .py files mapd_heuristic.py and mapd_optimal.py provide the heuristic and optimal solutions respectively.

Report on Algortihms used:

The adjoining report on the assignment can be found here.

Execution and test files

The file can be executed in the terminal as: python file_name.py test_filename.task A sample test file namely demo.task has been provided and would be parsed as default if test_filename.task is not provided in the CLI. It is advised to provide the complete address of the task file in the terminal during execution.

Format of input in demo.task

6 17
1 1 1 1 1 2 1 1 1 1 2 1 1 0 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1
1 0 1 1 1 1 2 1 1 2 1 1 1 1 1 0 1
1 1 1 2 1 1 1 1 1 1 1 1 2 1 1 1 1
1 1 1 1 1 1 2 1 1 1 0 1 1 1 1 1 2
2 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1
3
0 0 0 8
5 9 5 5
0 0 5 5
3
5 0 3 12
4 6 0 5
5 0 0 5
  • The first line inputs the dimensions of the grid, where 6 is the number of rows and 17 is the number of columns.
  • The next 6 lines contain 17 space separated integers each, providing the details of the grid where 1 signifies normal cells, 2 signifies temporary storages and 0 signifies blocked cells or obstacles.
  • The next line contains one integer denoting the number of robots.
  • The next 3 lines contain 4 space-separated integers each, where first two are the coordinates of the starting point and next two (0,8) are the coordinates of the ending point of each of the 3 robots.
  • The next line contains one integer, denoting number of tasks to be completed (3 in this case).
  • The next 3 lines contain 4 space-separated integers each, where first two are the coordinates of the pickup point and next two (0,8) are the coordinates of the drop-off point of each of the 3 tasks respectively.

Format of output

approximate makespan:  26
optimal allocation: 
Agent 0 : [0]
Agent 1 : [2]
Agent 2 : [1]

Here the output reports the approximate make-span and the optimal allocation for each of the agents as a list of tasks.

Results

For the task given in demo.task file, we got the following outputs:

Heuristic:

approximate makespan:  26
optimal allocation: 
Agent 0 : [0]
Agent 1 : [2]
Agent 2 : [1]

Optimal:

makespan of optimal allocation:  28
optimal allocation: 
Agent 0 : [2]
Agent 1 : [1]
Agent 2 : [0]

Time for completion:

  • Heuristic: 9.5367431640625e-07 seconds

  • Optimal: 1.1920928955078125e-06 seconds

Both have been tested on the same machine with the same test file (demo.task).

mapd's People

Contributors

arka816 avatar ranabirbasu12 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.