Human information storage
This data structure stores the information we have collected about the human user, and lets the robot know what questions have yet to be answered. We use a Python dictionary to hold the data. This type of data structure let's us make a freeform version of a database-like table. I add values to the dictionary as we go to make extension easier.
I put a list of miscellaneous questions called stuff to throw some spice in the robot's information gathering, so that the questions don't seem too monotonous. The robot will ask if you like the color pink, singing, dancing, robots, airplanes, and so on.
We put the list in priority order by copying the dictionary, and replacing the data fields with relative point values from ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access