René's URL Explorer Experiment


Title: Update the Maze Class (Video) – Real Python

Open Graph Title: Update the Maze Class – Real Python

Description: Updating the Maze Class. At this point, the serializer module doesn’t depend on the Maze class anymore because there are no direct references to it. You can safely update your maze model as a consequence. With this class method, you can .load(…

Open Graph Description: Updating the Maze Class. At this point, the serializer module doesn’t depend on the Maze class anymore because there are no direct references to it. You can safely update your maze model as a consequence. With this class method, you can .load(…

Opengraph URL: https://realpython.com/lessons/python-maze-class/

X: @realpython

direct link

Domain: realpython.com


Hey, it has json ld scripts:
  {
    "@context": "https://schema.org",
    "@type": "VideoObject",
    "name": "Update the Maze Class",
    "description": "Updating the Maze Class. At this point, the serializer module doesn’t depend on the Maze class anymore because there are no direct references to it. You can safely update your maze model as a consequence. With this class method, you can .load(…",
    "thumbnailUrl": ["https://files.realpython.com/media/Build-a-Pac-Man-Maze-Solver-in-Python_Watermarked.c2e79a85fc99.jpg"],
    "uploadDate": "2023-06-06T14:00:00+00:00",
    "duration": "PT3M16S",
    
    "potentialAction": {
      "@type": "SeekToAction",
      "target": "https://realpython.com/lessons/python-maze-class/#t={seek_to_second_number}",
      "startOffset-input": "required name=seek_to_second_number"
    }
  }
  

authorReal Python
theme-color#18354c
color-schemelight dark
twitter:cardsummary_large_image
twitter:imagehttps://files.realpython.com/media/Build-a-Pac-Man-Maze-Solver-in-Python_Watermarked.c2e79a85fc99.jpg
og:imagehttps://files.realpython.com/media/Build-a-Pac-Man-Maze-Solver-in-Python_Watermarked.c2e79a85fc99.jpg
twitter:creator@realpython
og:typevideo.episode
og:site_nameReal Python
apple-mobile-web-app-titleReal Python

Links:

https://realpython.com/
Start Herehttps://realpython.com/start-here/
Learn Python https://realpython.com/lessons/python-maze-class/
Your Learning Plan →Your personalized Python learning planhttps://realpython.com/account/learning-plan/
Python Tutorials →In-depth articles and video courseshttps://realpython.com/search?kind=article&kind=course&order=newest&_from=nav_library
Learning Paths →Guided study plans for accelerated learninghttps://realpython.com/learning-paths/
Quizzes & Exercises →Check your learning progresshttps://realpython.com/search?kind=exercise&kind=quiz&_from=nav_library
Browse Topics →Focus on a specific area or skill levelhttps://realpython.com/tutorials/all/
Reference →Concise definitions for common Python termshttps://realpython.com/ref/
Mentor AI →NewYour personal Python mentorhttps://realpython.com/mentor/
Office Hours →Live Q&A calls with Python expertshttps://realpython.com/office-hours/
Community Chat →Learn with other Pythonistashttps://realpython.com/community/
Live Courses →Live, instructor-led Python courseshttps://realpython.com/live/
Books →Round out your knowledge and learn offlinehttps://realpython.com/products/books/
Podcast →Hear what’s new in the world of Pythonhttps://realpython.com/podcasts/rpp/
Unlock All Content and Become a Python Expert →Get unlimited access to all Real Python has to offerhttps://realpython.com/account/join/?from=navbar_learn
Unlock All Content →Become a Python Experthttps://realpython.com/account/join/?from=navbar_learn
More https://realpython.com/lessons/python-maze-class/
Learner Storieshttps://realpython.com/learner-stories/
Python Newsletterhttps://realpython.com/newsletter/
Python Job Boardhttps://www.pythonjobshq.com
Meet the Teamhttps://realpython.com/team/
Become a Contributorhttps://realpython.com/jobs/
Searchhttps://realpython.com/search
https://realpython.com/search
Joinhttps://realpython.com/account/join/
Sign‑Inhttps://realpython.com/account/login/?intent=navbar&next=%2Flessons%2Fpython-maze-class%2F
Unlock This Lessonhttps://realpython.com/account/join/?utm_source=rp_lesson&utm_content=python-maze-solver
Unlock This Lessonhttps://realpython.com/account/join/?utm_source=rp_lesson&utm_content=python-maze-solver
https://realpython.com/courses/python-maze-solver/#team
Mazes in Python: Build, Visualize, Store, and Solvehttps://realpython.com/courses/python-maze-solver/
Darren Joneshttps://realpython.com/courses/python-maze-solver/#team
Recommended Tutorialhttps://realpython.com/python-maze-solver/
Course Slides (.pdf)https://realpython.com/courses/python-maze-solver/downloads/mazes-in-python-slides/
Sample Code (.zip)https://realpython.com/courses/python-maze-solver/downloads/mazes-in-python-code/
Ask a Questionhttps://realpython.com/lessons/python-maze-class/#discussion
https://realpython.com/feedback/survey/course/python-maze-solver/liked/?from=lesson-title
https://realpython.com/feedback/survey/course/python-maze-solver/disliked/?from=lesson-title
Contentshttps://realpython.com/lessons/python-maze-class/#description
Transcripthttps://realpython.com/lessons/python-maze-class/#transcript
Discussionhttps://realpython.com/lessons/python-maze-class/#discussion
00:00https://realpython.com/lessons/python-maze-class/#t=0.98
Updating the Maze Class.https://realpython.com/lessons/python-maze-class/#t=0.98
At this point,https://realpython.com/lessons/python-maze-class/#t=2.768
the serializer module doesn’t depend on the Maze class anymore because there arehttps://realpython.com/lessons/python-maze-class/#t=4.06
no direct references to it.https://realpython.com/lessons/python-maze-class/#t=8.24
00:10https://realpython.com/lessons/python-maze-class/#t=10.86
You can safely update your maze model as a consequence.https://realpython.com/lessons/python-maze-class/#t=10.86
00:40https://realpython.com/lessons/python-maze-class/#t=40.85
With this class method,https://realpython.com/lessons/python-maze-class/#t=40.85
you can .load() squares from the specified path and turn them into a new Mazehttps://realpython.com/lessons/python-maze-class/#t=42.04
instance.https://realpython.com/lessons/python-maze-class/#t=46.9
00:59https://realpython.com/lessons/python-maze-class/#t=59.05
Conversely, by calling .dump() on an existing Maze object,https://realpython.com/lessons/python-maze-class/#t=59.05
you’ll dump its squares along with the necessary metadata to a given path.https://realpython.com/lessons/python-maze-class/#t=62.54
01:15https://realpython.com/lessons/python-maze-class/#t=75.29
On-screen is an example of the Maze.load() class method in action,https://realpython.com/lessons/python-maze-class/#t=75.29
which loads your miniature test maze.https://realpython.com/lessons/python-maze-class/#t=79.0
01:37https://realpython.com/lessons/python-maze-class/#t=97.29
Now,https://realpython.com/lessons/python-maze-class/#t=97.29
you only need to import one symbol from the maze_solver package to work withhttps://realpython.com/lessons/python-maze-class/#t=97.57
mazes stored in files.https://realpython.com/lessons/python-maze-class/#t=101.88
The deserialized object’s attribute values confirm that you successfullyhttps://realpython.com/lessons/python-maze-class/#t=104.05
loaded the maze.https://realpython.com/lessons/python-maze-class/#t=108.03
01:52https://realpython.com/lessons/python-maze-class/#t=112.62
You can also check if you correctly guessed which squares are the entrance and exithttps://realpython.com/lessons/python-maze-class/#t=112.62
of the miniature maze.https://realpython.com/lessons/python-maze-class/#t=117.08
So with that in place,https://realpython.com/lessons/python-maze-class/#t=124.16
why not go ahead and try loading a more challenging maze from the supportinghttps://realpython.com/lessons/python-maze-class/#t=125.52
materials?https://realpython.com/lessons/python-maze-class/#t=129.34
02:10https://realpython.com/lessons/python-maze-class/#t=130.22
For example,https://realpython.com/lessons/python-maze-class/#t=130.22
the labyrinth.maze has 896 squares arranged in 32 rows andhttps://realpython.com/lessons/python-maze-class/#t=131.6
28 columns.https://realpython.com/lessons/python-maze-class/#t=136.5
You can preview it in your web browser by running the code seen on-screen in thehttps://realpython.com/lessons/python-maze-class/#t=139.87
REPL.https://realpython.com/lessons/python-maze-class/#t=144.11
02:27https://realpython.com/lessons/python-maze-class/#t=147.81
Make sure that you specify the right path to the file and run the code from ahttps://realpython.com/lessons/python-maze-class/#t=147.81
virtual environment that has the maze_solver package installed.https://realpython.com/lessons/python-maze-class/#t=151.74
02:36https://realpython.com/lessons/python-maze-class/#t=156.12
This is the maze you should see on-screen.https://realpython.com/lessons/python-maze-class/#t=156.12
This maze was assembled from satellite and aerial photos of a real worldhttps://realpython.com/lessons/python-maze-class/#t=160.97
labyrinth, which can take as long as forty-five minutes to complete on foot.https://realpython.com/lessons/python-maze-class/#t=164.65
02:50https://realpython.com/lessons/python-maze-class/#t=170.0
Can you find the way out to this maze by looking at it?https://realpython.com/lessons/python-maze-class/#t=170.0
While there are nohttps://realpython.com/lessons/python-maze-class/#t=173.076
enemies, the maze is still quite tricky.https://realpython.com/lessons/python-maze-class/#t=174.12
It would, of course, be better to get Python to solve this maze and indeed anyhttps://realpython.com/lessons/python-maze-class/#t=177.6
others you have stored in your binary format.https://realpython.com/lessons/python-maze-class/#t=182.14
03:05https://realpython.com/lessons/python-maze-class/#t=185.99
So, in the next section of the course,https://realpython.com/lessons/python-maze-class/#t=185.99
you’ll look at how you can do that by implementing graph representation of mazeshttps://realpython.com/lessons/python-maze-class/#t=187.67
and then solving them with NetworkX.https://realpython.com/lessons/python-maze-class/#t=192.19
Become a Memberhttps://realpython.com/account/join/
https://realpython.com/lessons/python-self-contained-maze/
Overviewhttps://realpython.com/courses/python-maze-solver/
https://realpython.com/lessons/solve-python-maze-graph-based/
Mazes in Python: Build and Visualize 02:47 https://realpython.com/videos/python-maze-solver-part-1-overview/
Check Out What You'll Make 02:39 https://realpython.com/videos/python-maze-solver-project/
Lay the Groundwork 04:02 https://realpython.com/videos/python-maze-solver-groundwork/
Scaffold the Project Structure 04:50 https://realpython.com/lessons/python-maze-solver-structure/
Represent the Maze With Objects 06:37 https://realpython.com/lessons/represent-maze-with-objects/
Create Border Patterns 06:32 https://realpython.com/lessons/python-maze-border-patterns/
Model the Square 02:25 https://realpython.com/lessons/model-python-maze-square/
Build the Maze 09:07 https://realpython.com/lessons/build-python-maze/
Visualize the Maze With SVG 04:45 https://realpython.com/lessons/python-maze-svg/
Implement Geometric Primitives 04:48 https://realpython.com/lessons/python-maze-geometric-primitives/
Add More Primitives 03:47 https://realpython.com/lessons/python-maze-more-primitives/
Decompose the Border Into Primitives 04:41 https://realpython.com/lessons/decompose-python-maze-border/
Add More Border Patterns 03:58 https://realpython.com/lessons/python-maze-more-border-patterns/
Build the SVG Renderer 03:49 https://realpython.com/lessons/python-maze-svg-renderer/
Add Features to the Renderer 06:50 https://realpython.com/lessons/python-maze-renderer-features/
Draw the Solution 03:13 https://realpython.com/lessons/draw-python-maze-solution/
Preview the Rendered Maze and Its Solution 04:56 https://realpython.com/lessons/preview-python-maze/
Mazes in Python: Build and Visualize (Recap) 01:14 https://realpython.com/lessons/python-maze-solver-part-1-summary/
Mazes in Python: Store and Solve 01:48 https://realpython.com/videos/python-maze-solver-part-2-overview/
Load the Maze From a Binary File 04:55 https://realpython.com/videos/python-maze-binary-file/
Choose Your Data Alignment 05:09 https://realpython.com/videos/python-maze-data-alignment/
Define the File Header and Body 08:12 https://realpython.com/lessons/python-maze-file-header-and-body/
Serialize the Maze 05:22 https://realpython.com/lessons/serialize-python-maze/
Deserialize the Maze 04:32 https://realpython.com/lessons/deserialize-python-maze/
Make the Maze Self-Contained 04:30 https://realpython.com/lessons/python-self-contained-maze/
Update the Maze Class 03:16 https://realpython.com/lessons/python-maze-class/
Solve the Maze Using a Graph-Based Approach 03:01 https://realpython.com/lessons/solve-python-maze-graph-based/
Transform the Maze Into a Graph 07:06 https://realpython.com/lessons/transform-python-maze-graph/
Find the Shortest Path 05:23 https://realpython.com/lessons/python-maze-shortest-path/
Add Weights to Graph Edges 02:36 https://realpython.com/lessons/python-map-weights-graph-edges/
Introduce Enemies and Rewards 06:04 https://realpython.com/lessons/python-maze-enemies-rewards/
Make a Runnable Script 03:59 https://realpython.com/lessons/python-maze-runnable-script/
Mazes in Python: Store and Solve (Recap) 01:23 https://realpython.com/lessons/python-maze-solver-part-2-summary/
Privacy Policyhttps://realpython.com/privacy-policy/

Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover

Robots: max-image-preview:large


URLs of crawlers that visited me.