How inesmcm26/cifo-24-25 works
Project type and purpose
• This is an educational, open-source Python library paired with Jupyter notebooks for teaching Computational Intelligence optimization algorithms (hill climbing, simulated annealing, genetic algorithms).
• The “library” folder contains all core algorithmic code; the two notebook folders contain “class” versions (empty cells for students) and “solution” versions (filled-in answers).
File structure
• Top-level:
• library/
• notebooks-class/
• notebooks-solution/
• requirements.txt
• library/ substructure:
• algorithms/ – various algorithm implementations
• problems/ – problem definitions and data sources
• solution.py, utils.py – common utilities and solution wrappers
• notebooks-class and notebooks-solution mirror each other by week, importing and exercising the library.
• No web server, persistence layer or external microservices—pure Python modules and Jupyter.
Key README insights
• Course repository; students edit notebooks-class, never touching notebooks-solution.
• The library is built incrementally from week to week.
• Dependencies managed via requirements.txt; run all code inside a Jupyter/Python environment.
Main components
a. Python environment / Jupyter kernel
b. Library component:
• Algorithms module
• hill_climbing.py
• simulated_annealing.py
• genetic_algorithms/ (algorithm.py, crossover.py, mutation.py, selection.py)
• Problems module
• problem classes (int_bin, int_max, tsp, ks)
• data sources (ks_data.py, tsp_data.py)
• Utils (utils.py) and Solution wrapper (solution.py)
c. Notebook clients:
• notebooks-class (empty cells)
• notebooks-solution (filled solutions)
d. External dependencies:
• Jupyter
• Python packages (NumPy, pandas, matplotlib, etc.)
Relationships & data flow
• Notebooks import Library → select a Problem → feed Problem to an Algorithm → Algorithm uses Utils → returns a Solution → Notebook visualizes results.
Architectural patterns & design principles
• Modular Python package: clear separation of concerns (algorithms vs. problem definitions vs. utilities).
• Incremental build: library evolves over time, used by versioned notebooks.
• No persistent storage or services—stateless computations within each notebook session.
2. Inside it, place:
– On the left: “notebooks-class” and “notebooks-solution” side by side.
3. Outside or adjacent: “requirements.txt → External Dependencies” listing libraries.
4. Connect:
• Library.Algorithms → Library.Utils (helper calls)
• Library → Notebooks (returns results)
Detail
• Don’t lump “algorithms” into a single block—show hill climbing, simulated annealing, and GA sub-modules.
• That genetic_algorithms itself has subcomponents (crossover, mutation, selection).
• That Problem classes encapsulate both the problem definition and the data they require.
• That notebooks are the user interface for running experiments and visualizing outputs.