Skip to content

paolomorettin/FAI-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FAI-code

Python3 code for the Fundamentals of AI course lab.

Feel free to reuse / distribute / contribute.

Acknowledgements:

  • Mattia Rigon (2023) - Added support for LRTA* with non-uniform action costs.
  • Alessandro Moscatelli (2024) - Added novel exercise types and quality-of-life changes.

Ch. 03 - Search algorithms

Extra required packages: matplotlib, networkx, numpy.

In search/, run: python3 search.py alg, where alg in {bfs, dfs, ucs, greedy, astar}

Ch. 04 - Non-conventional search

Extra required packages: matplotlib, networkx, numpy, seaborn.

All the examples are located in nonconventional-search/.

Hill-climbing

To run hill-climbing on 2D grid problems, go to hill_climbing and execute: python3 hill_climbing.py alg, where alg in [steepest, stochastic, stochastic-unweighted]. Use the -h flag for help on optional arguments.

Genetic algorithms

To run the genetic seach algorithm on the Master Sandwitch problem, try: python3 genetic.py. Use the -h flag for help on optional arguments.

Online search

To run the online seach algorithms on Maze problems, try: python3 online_search.py alg, where alg in [odfs, lrtastar]. Use the -h flag for help on optional arguments.

Ch. 05 - Adversarial search

Here you can find an online tool for practicing Alpha/Beta pruning.

About

Code for the Fundamentals of AI course

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages