|
|
|
@ -7,18 +7,24 @@ import kotlin.time.measureTime
|
|
|
|
|
class HierarchicalPathfinding {
|
|
|
|
|
/*
|
|
|
|
|
Next steps:
|
|
|
|
|
Measure maze complexity by number of steps in path
|
|
|
|
|
Dump results as CSV
|
|
|
|
|
Dump ANSI text to file for processing into image
|
|
|
|
|
Add command line options to run particular pathfinders, render particular pathfinder's markings
|
|
|
|
|
Add HPA*, should be a bit easier with existing abstractions. Hard part will be the path calculations
|
|
|
|
|
Use R to render syntax highlights https://github.com/KDE/syntax-highlighting/blob/master/data/syntax/kotlin.xml
|
|
|
|
|
https://pandoc.org/MANUAL.html#syntax-highlighting
|
|
|
|
|
https://hamel.dev/notes/quarto/highlighting.html
|
|
|
|
|
|
|
|
|
|
Measure primmaze2.exe during benchmarks by running from MazeFinder
|
|
|
|
|
https://stackoverflow.com/questions/35421699/how-to-invoke-external-command-from-within-kotlin-code
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
companion object {
|
|
|
|
|
@JvmStatic
|
|
|
|
|
fun main(args: Array<String>) {
|
|
|
|
|
val benchmarking = true
|
|
|
|
|
val ns = arrayListOf(50, 100, 250, 500, 750, 1000).reversed()
|
|
|
|
|
val ns = arrayListOf(50, 100, 250, 500, 750, 1000)
|
|
|
|
|
val iterations = 10
|
|
|
|
|
val file = File("performance.csv")
|
|
|
|
|
file.writeText("n,path-length,prims,bfs,astar-array,astar-hashmap\n")
|
|
|
|
|