GithubHelp home page GithubHelp logo

kerwinzxc / searching-algorithms-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dimmzy/searching-algorithms-server

0.0 0.0 0.0 366 KB

Framework to solve graph pathfinding using A*,BestFirstSearch,BFS,DFS.

C++ 98.65% CMake 1.35%

searching-algorithms-server's Introduction

Searching Algorithms Server

Github Repository

The Searching Algorithms Server program provides a framework to handle communications between a client and a server. The main focus of the program is to allow the client to send a structured "problem" and the server to process it and pass a solution.

In our instance, we receive weighted graphs represented as Matricies and perform path finding algorithms to find the best path between the starting node and the ending node.

Algorithms

The Algorithms we have implemented for pathfinding are:

BFS and DFS don't take into consideration the weights of the nodes so they've been compared for complexity by number of nodes processed.

Running all four algorithms on a 37x37 matrix with some blocked cells (denoted with -1) we have received the following results:

alt text

So for cases where we're looking for the cheapest and shortest path, we'll be defaulting to use A*.

Usage

Compile with

g++ -std=c++14 *.cpp -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -o a.out -pthread

You can then connect to the server (port 5600 by default) or specify a port as an argument.

Send the matrix you want to use A* on, and after several calculations you'll receive the A* path as output from the server.

The matrix template you send to the server is:

cell[00],cell[01],cell[02],...,cell[0n-1]

cell[10],cell[11],cell[12],...,cell[1n-1]

...

cell[n-10],cell[n-11],cell[n-12],...,cell[n-1n-1]

0,0 <-- Starting cell

n-1,n-1 <-- Goal cell

end

The cell locations should denote the cost for the specific cell. cost of -1 is blocked cell.

For example:

1,2,3

3,-1,2

3,3,3

0,0

2,2

end

Contributors

Dima
Haim

searching-algorithms-server's People

Contributors

dimmzy avatar haimisakov 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.