ECE537 J, Artificial Intelligence, Spring 2025
Mon, Wed from 5:05 to 6:20 p.m. in MCA 202 A

The Book

Examinations

Assignments

1 due: Wednesday 22nd January A reading assignment.
2 due: Tuesday 11th February Complete the breadth-first farmer and fox solver.
3 due: Monday 24th February Solve the N Queens problem two different ways.
4 due: Sun 13th April Experiment in Natural Language understanding.
Python code, Dictionary, Grammar.
The now-complete write-up of how it all works.
5 due: Wed 23rd April Two exercises in prolog.
Here is the family tree diagram.
6 due: Mon 28th April A program that uses minimax to play Nim against itself or a human.
Read the Important Rules link above before submitting.

Submit assignments (code + sample run(s)) through blackboard (under Assignments).
Submissions must be clearly readable word documents.

Extra material

PC log in - use Putty or your own preferred SSH app.
OR mac users: start the terminal app, windows users: start powershell, then type the command
ssh username@rabbit.eng.miami.edu and type your password when prompted.
Windows users beware: you can't use ctrl-V in pico, but page up and page down will do the job.

Class History

Class 1 - Mon 13-1-2025    Quick introductions,
There is a special reading assignment to get us started.
Some introductory thoughts.
A little problem.
Class 2 - Wed 15-1-2025 Exploring Python.
Day Off 15th
Class 3 - Wed 22-1-2025 The farmer, fox, etc, etc puzzle, a very basic but real AI solution is used.
Also the Python dict (dictionary) data type is introduced, and how to make a mutable object hashable.
Class 4 - Mon 27-1-2025 Generalising searches.
Valuation and cost functions, maybe no goal state, just something good enough.
Open set and closed set.
Backtracking: given for free by recursion if used correctly.
Sensible implementation of a queue for breadth-first search.
A bit about iterative deepening.
Class 5 - Wed 29-1-2025 Getting value from Python exceptions.
Building a binary tree, first as an example, then as a demonstration of iterative deepening:
Iterative deepening vastly reduces memory requirement for BFS.
Class 6 - Mon 3-2-2025 Bacon and Kepler.
A little bit of lisp.
Class 7 - Wed 5-2-2025 defining functions, data structures, a better way of getting input, almost lazy evaluation.
(added an extra 0 parameter function eratosthenes, as a challenge for anyone interested,
 after import lispy5 as L and L.run(), enter e.g. (first 100 (eratosthenes))
 you'll probably see what it does almost immediately, the challenge is in working
 out exactly how it does it)
Class 8 - Mon 10-2-2025 (Intelligent?) Agents.
Class 9 - Wed 12-2-2025 Hackathon announcement for 22-23 Feb.
Some real problem solving, but it's only a puzzle.
queen-attacks.pdf.
Class 10 - Mon 17-2-2025 A more convenient setup for windows.
Soduko puzzles for controlled searches.
This is the basic depth-first search, print_grid uses unicode, paint_grid does the same but with tkinter.
This is the more controlled depth-first search with its subtle error intact.
Class 11 - Wed 19-2-2025 The final version fully correct.
What was "more controlled" about the final version? Backtracking now explicit and more efficient.
Comparing Breadth first search, Dijkstra's algorithm and A* search in the context of real world shortest path.
Heuristics, admissibility and consistency give guarantees.
Class 12 - Mon 24-2-2025 atn, vocab, grammar
Class 13 - Wed 26-2-2025 The traditional parsing method for logical (such as programming) languages, can't handle ambiguity and others.
The ATN approach and its complicated needs.
Class 14 - Mon 3-3-2025 ATNs tamed at last.
Class 15 - Wed 5-3-2025 First mid-term test, a sample test
Topics: searching of trees, graphs, and state spaces, depth first (with recursion and with explicit stack), breadth first,
depth first with iterative deepening, best first, heuristic, backtracking (both through recursion and explicitly controlled),
Dijkstra's algorithm, A* algorithm, basic python.
Break 10th to 14th
Class 16 - Mon 17-3-2025 To be tidied up, for upcoming assignment: dictionary, grammar, atn.
Logic based agents: pdf and docx.
Class 17 - Wed 19-3-2025 Logic and resolution.
Class 18 - Mon 24-3-2025 Quite a bit of prolog.
Class 19 - Wed 26-3-2025 prolog-backtrack.pdf, prolog-backtrack.docx,
Reversible arithmetic with the Peano axioms.
knight-pl.pdf, knight-pl.docx.
The complete unification algorithm.
Class 20 - Mon 31-3-2025 Before moving on: recording the path taken in prolog.
Class 21 - Wed 2-4-2025 Neural Networks,
A very simple one.
Class 22 - Mon 7-4-2025 Neural Networks,
Smallest possible, just one neuron,
Little n-grams.
Class 23 - Wed 9-4-2025 Training a neural network with hidden layers.
Probability and probabilistic reasoning.
Class 24 - Mon 14-4-2025 reminders (to me).
Probability, probabilistic reasoning, and fuzzy logic.
Class 25 - Wed 16-4-2025 Competitive games (like many real life situations) naughts and crosses as an example:
The minimax strategy, and that in Python.
Class 26 - Mon 21-4-2025 Second mid-term: Sample test.
Topics:
       Aspects of searching not covered by first test (mainly iterative deepening, open and closed sets),
       Logic and resolution, Prolog programming.
       Neural networks.
       Probability and related topics.
Class 27 - Wed 23-4-2025 The minimax naughts and crosses with optional human player.
alpha-beta pruning with minimax.
Wordnet - a kind of semantic network, and its little codes.
A very old approach to natural language processing.
A little bit of natural language processing in prolog.
Class 28 - Mon 28-4-2025