Skip to content

IDA* algorithm implemented in Scala using functional programming

Notifications You must be signed in to change notification settings

moozeq/jps-scala-ida-star

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JPS_IDAStar

IDA* algorithm implemented in Scala using functional programming

Project structure:

  • src/main/scala/idastar/Edge structure which represents edge in graph
  • src/main/scala/idastar/Graph structure which represents graph using adjacency list of vertices
  • src/main/scala/idastar/IDAStar class implements algorithm IDA* on graph and list of heuristic values for vertices
  • src/test/scala/idastar/IDAStarTest tests perfomed on algorithm to check its correctness

To use IDA* algorithm call: IDAStar(graph, heuristicVerticesList).IDAStar(firstVertex)

where:

  • graph - is idastar.Graph, graph constructed as adjacency list
  • heuristicVerticesList - is Stream of heuristic values for vertices in graph
  • firstVertex - index of first vertex from which searching will start

As a result you'll receive tuple of 3 elements:

  • _.1 = length: Double - length of the found path, 0 if not found
  • _.2 = path: Stream[Int] - found path as a stream, empty if not found
  • _.3 = found: Boolean - variable informs if found solution, false if not found

Use index.html to check documentation of the project

About

IDA* algorithm implemented in Scala using functional programming

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published