Lite / Intelligent Robotic Systems / Week 4
Week 4: Data structures
This week you will
- Choose between lists, dictionaries, sets, tuples, stacks and queues for a task and justify the choice.
- Use a queue to process events or explore a grid in order (breadth-first search).
Lessons
- List, tuple, set or dict? Pick the right container · about 35 min
Checking whether a part number is in a list of 100,000 parts takes up to 100,000 comparisons. With a set it takes about one. What changed? - Stacks and queues: who goes next? · about 35 min
A robot cell gets jobs faster than it can do them. Do you serve the newest job first, or the oldest? The answer changes everything. - Breadth-first search: a queue explores a map · about 45 min
Put a robot in a maze and flood it outwards one step at a time. Why does the first time the flood touches the goal give the shortest route?