October 28, 2024
Monday of Week 10
Topics of the day
- Writing hash functions
- Stateful comparators
- Problem spaces
Suggested readings
- Section 3.1.3 from George Luger, Artificial Intelligence, 5e
- Section 3.1.3 from George Luger, Artificial Intelligence, 6e
Online references
- State space search (en.wikipedia.org)
- Hash functions (en.wikipedia.org)
- hash in C++ (en.cppreference.com)
- hashCode() in Java (docs.oracle.com)
Questions and exercises
- What are the requirements for a hash function? Once a hash function has met the requirements, what makes a legal hash function better or worse?
- Searching a "state space" is a little different from the kinds of graph searching we've done with Dijkstra's algorithm and A*. What's the biggest difference?
- Pick a two-player face-to-face game such as tic-tac-toe or checkers or othello or connect 4 or something like that. What data would have to be stored in a "state" of the game you chose?
Assignments
Today
- Homework 4 revision
Upcoming
- Project 3: A* due (04 Nov)
- Homework 5 due (04 Nov)