How franciscodominguezmateos/ai works
Main Components
• AI Search Algorithms: Separate modules for each search strategy (pyAIExpectiMax.py, pyAIMinMax.py, and pyAIMinMaxAlphaBeta.py).
• Problem Definition & Domain Modeling: Modules under pyAISearchProblem (pyPathPlanning.py, pyProblem.py, pyState.py) that represent the problem context and state space.
• Data Structures / Collections: The pyAISearchCollections package and its underlying implementation (pyAISearchCollection.py), used to store and manage nodes or states.
• Node Representation: Individual modules such as pyAISearchNode.py, which likely encapsulate the properties of each node in the search tree.
• Solver Implementations: Different solver approaches are evident from pyAISearchSolver, pyAISearchSolverGraph, and pyAISearchSolverTree which indicate implementations for exploring the problem space.
• Main Application Entrypoints: The main modules (pyMainPathPlanning.py, pyMainTicToc.py) that likely serve as execution points for different use cases or problem scenarios.
Relationships and Interactions
• The Problem Definition layer (within pyAISearchProblem) should be depicted as the foundation that defines the rules, states, and dynamics of the specific scenarios (like path planning or Tic Tac Toe).
• Search Nodes and Collections: The node representations (pyAISearchNode) are used by both the search algorithms and solvers. The search collections provide the data structure (e.g., queues, stacks, or priority queues) required for managing these nodes.
• Search Algorithms: Each algorithm (MinMax, ExpectiMax, and MinMaxAlphaBeta) will interact with the solver components by consulting the problem definitions and using the collections to traverse the state space.
• Solver Variants: The difference between graph and tree solvers should be clearly noted. Specify how the solvers use either tree or graph-based expansions to manage the search process.
• Main Application Entry Points: These modules (pyMainPathPlanning and pyMainTicToc) interact with the problem definitions, initiate the appropriate search and solve flows, and then output or handle the results.
Architectural Patterns and Design Principles
• Separation of Concerns: The design clearly segments the problem modeling, algorithmic logic, data management, and solver control.
• Modularity: Each search algorithm and problem type is implemented in separate modules, making it easier to extend or replace individual components.
• Reusability: The collections and node modules are abstracted out to be reused across different algorithm implementations and problem instances.
Relevant Technologies and Frameworks
• Python as the primary programming language.
• If any additional libraries or design patterns (e.g., MVC-like separation, dependency injection) are used, mention them based on common practices; however, the file tree itself suggests a focus on algorithmic implementations rather than a web framework or full-stack application.