Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

[BETA] Improved performance (originally from #7 & #8) #9

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

jm55DLSU
Copy link
Collaborator

@jm55DLSU jm55DLSU commented Mar 1, 2023

Note that this is not intended as a deliverable but rather just an experiment

The following fixes are as follows:

  1. Better search performance by using 'list(set())' as suppose to 'list(dict())'
  2. Attempts to further improve path selection speed (and supposedly quality) by sorting the frontier by lowest distance first every time the algorithm searches for available paths on frontier states.

It was revealed that the fix introduces variances in the average path lengths as shown by its decimal values. As that was the case, this reveals that while the fix improved performance it did have a bit of a trade-off in terms of path selection albeit more noticeable on mazes with scarce walls rather than actual well-designed mazes.

This then was the reason why this supposed improvement is still in BETA stage as it is yet to be proven if the performance benefit is worth the minor change in path selection quality.

Before #7
Screenshot (305)

During/After #7
Screenshot (304)

Using end_64.txt maze which originally had an average of 1.98s, it is now at an average of 0.35s
Added sorting by priority after removing duplicates which could improve quality of first frontiers to check for possible moves as it is sorted by least to greatest priority.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant