How aneprados/reto_algoritmos works
Main Components
• Main Application – Represented by files such as main.py and menu.py. This part of the system likely handles user input and overall program flow.
• Algorithmic Modules – There are two primary modules: one for the “Caballos” (knight/chess knight problem) and one for “Reinas” (queen or related problem). Each contains its own set of classes (e.g., Caballo.py, Nodo.py, Pobrador.py in the Caballos directory and Nodo.py, Observar.py, reina.py in the Reinas directory).
• Internal Classes and Utilities – Within each module, there are supporting classes (like “Nodo” and “lanzador”) that manage state representations and algorithm execution (likely implementing techniques such as backtracking and memoization that are mentioned in the README).
Relationships and Interactions
• The Main Application (main.py/menu.py) acts as the central hub. It likely provides the user interface for selecting which algorithmic module to run.
• Once a selection is made, the appropriate module’s “lanzador” file (launcher) is invoked, which then utilizes other classes in that directory (e.g., Caballo, Nodo, Pobrador for the knight problem) to perform computations.
• Within each algorithm module, classes interact for tasks such as building state trees (using Nodo), executing moves (Caballo or reina), and managing algorithm-specific utility functions (e.g., in Pobrador or Observar).
Architectural Patterns or Design Principles
• Separation of Concerns – The project cleanly separates distinct algorithm implementations into separate modules, which keeps each challenge encapsulated.
• Reusability and Modularity – By placing each challenge in its own directory with clearly designated roles (launcher, algorithm core classes), the design emphasizes modularity.
Relevant Technologies or Frameworks
• Python – Clearly the primary language.
• Visualization (Optional) – The README mentions a dependency on pygame, so if visualization is part of any of these modules, include it as an auxiliary component that interfaces with the main algorithm or UI.