Then:
git clone https://github.com/Avasil/labs-self-avoiding-walk.git
cd labs-self-avoiding-walk
sbt test
Takes three parameters in order:
- length of the sequence
- max number of iterations
- time in seconds e.g.
sbt run 67 20000 900
It will save the results in output/
directory as CSV file with the following name convention:
length-iterations-time-timestamp
where
length
is the length of the sequence
iterations
is maximum number of iterations
time
is the duration of the algorithm
timestamp
is the time of the run
This algorithm seems to need very high number of maximum iterations for higher number of sequences. Running it many times with low maximum number of iterations usually peaks quite fast and never improves despite not reaching the best sequence.
Using high number of iterations it usually finds the best solution in one of the first runs.