The research is mainly about the Python implementation of three basic algorithms: Depth-First Search, Breadth-First Search and A* Search. Besides, the paper introduces some of the auxiliary knowledge and theories: the four criteria for measuring algorithms, three kinds of queues, and grid-based simulation. While other coding languages like C++ and Java may focus on algorithm more and may have lots of templates and other solved works, Python seem not to focus so much on this, and OOP (object-oriented programming) is the major topic of high-level Python coding. Thus, constructing algorithms and mapping (or simulating real-world situations) indeed become a challenge.In this work, two simulations are made by generating classes: 1. grid-based world 2. graph and vertex. Grid based world introduces coordinates and heuristic functions, which constructs the environment suitable for greedy algorithms. Graph and vertex use nodes to represent different states in the of the world, and using frontier-based search, the nodes will be explored step by step from the initial state until the goal state is reached. After the environment and algorithms are constructed, finally, analysis for the three algorithms are presented in the conclusion part according to the criteria mentioned.
Access to the requested content is limited to institutions that have purchased or subscribe to SPIE eBooks.
You are receiving this notice because your organization may not have SPIE eBooks access.*
*Shibboleth/Open Athens users─please
sign in
to access your institution's subscriptions.
To obtain this item, you may purchase the complete book in print or electronic format on
SPIE.org.
INSTITUTIONAL Select your institution to access the SPIE Digital Library.
PERSONAL Sign in with your SPIE account to access your personal subscriptions or to use specific features such as save to my library, sign up for alerts, save searches, etc.