Create a Boggle Word Solver using recursion in Python

4.4
Sterne
30 Bewertungen
von
Coursera Project Network
2.708 bereits angemeldet
In diesem angeleitetes Projekt werden Sie:

Create a Boggle Word Solver in Python by defining various functions that load a 4x4 game board based on input.

Recursively search in all allowed directions for plausible words using Depth First Traversal.

Learn to store the dictionary in a trie data structure which makes for more efficient lookups. 

Clock1 hour
IntermediateMittel
CloudKein Download erforderlich
VideoVideo auf geteiltem Bildschirm
Comment DotsEnglisch
LaptopNur Desktop

In this 1-hour long project-based course, you will have created a Boggle Word Solver in Python by defining various functions that load a 4x4 game board based on input, recursively searches in all allowed directions for plausible words using Depth First Traversal, and then prints out the valid words based on length constraints and by cross-checking whether the word exists in the stored dictionary. You will also learn to store the dictionary in a trie data structure which makes for more efficient lookups. This guided project is aimed at learners who are wanting to learn or practice recursion and graph traversal concepts in Python by developing a fun game. Understanding DFS and recursion is essential and will greatly expand your programming potential as they are used at the base of various algorithms. Implementing a prefix tree will also help you understand a new efficient data structure. Note: This course works best for learners who are based in the North America region. We’re currently working on providing the same experience in other regions.

Kompetenzen, die Sie erwerben werden

  • Recursion
  • Python Programming
  • Tree (Data Structure)

Schritt für Schritt lernen

In einem Video, das auf einer Hälfte Ihres Arbeitsbereichs abgespielt wird, führt Sie Ihr Dozent durch diese Schritte:

  1. Load the dictionary and initialize a game board based on input.

  2. Create a class Tree to store the dictionary and define a function search to locate a letter in the Tree, and add a word, letter by letter to the tree structure.

  3. Determine the base cases for the actual traversal of the board to find valid words.

  4. Use recursion to create all possible strings of letters on the board.

  5. Complete the main function by calling the above defined functions and display the output, successfully developing a Boggle Word Solver.

Ablauf angeleiteter Projekte

Ihr Arbeitsbereich ist ein Cloud-Desktop direkt in Ihrem Browser, kein Download erforderlich

Ihr Dozent leitet Sie in einem Video mit geteiltem Bildschirm Schritt für Schritt an.

Häufig gestellte Fragen

Häufig gestellte Fragen

Haben Sie weitere Fragen? Besuchen Sie das Learner Help Center.