genEMLseed {mazeGen}R Documentation

Generate Equal Minimum Legs Seed

Description

This generate the solution by searching for the SEED that returns the specific number of paths to achieve the maximum score for a given rank and saturation.

Usage

genEMLseed(path = 3, rank = 5, satPercent = 0.5, seed = 1,
  runSeed = 500)

Arguments

path

Selecting the specific number of paths to achieve the maximum score.

rank

This is the rank of the maze.

satPercent

This is of saturation percentage ranging from 0-1.

seed

The starting seed to begin searching for the seed with specific paths.

runSeed

This determines the number of searches for the specific paths before stopping.

Details

This might be computationally intensive as the maze size increases. The seed is necessary so that the algorithm does not always begin from the smallest seed value. Based on the starting seed value, it will search for the next seed that returns the desired number of path defined by the user. To limit the search time, The function will stop looking for the seed based on the runSeed value. Using this function will guarantee that the minimum number of steps to achieve the maximum score will be the same for all possible paths. If the number of steps does not need to be equal across all possible paths for the maximum score, please use the genPathSeed function instead.

Author(s)

Aiden Loe and Maria Sanchez

See Also

np,mazeEst, genPathSeed

Examples


rank <- 5
satPercent <- 0.5
seed <- 1

#Search for just one unique path
justOne <- genEMLseed(path=1,rank=rank,satPercent=satPercent,seed=seed)
nodePosition <- np(rank,satPercent,seed=justOne)
mazeEst(nodePosition)

#Search for three path
justThree <- genEMLseed(path=3,rank=rank,satPercent=satPercent,seed=seed, runSeed=300)
nodePosition <- np(rank,satPercent,seed=justThree)
mazeEst(nodePosition)

[Package mazeGen version 0.1.3 Index]