Solving Problems with Search¶
Last week we looked at binary trees, but this week we ware going to look at n-ary trees! N-ary just means that they can have any numbers of branches.
For every problem in computer science, the tools are mostly the same (stacks and queues), but the way we represent the data is different. That is going to be the focus of today: how we represent data and how we can use that to solve problems.
States, Transitions, and Search¶
Representing how things are and how they can change is the primary goal for creating programs that can solve problems. The representations are called states. Each state is a single setting of variable. When you change between states, it is called a transition. In addition to representation, there is also a search process. Search is how the final goal is found.
States and transitions are used for things like:
- machines that beat games (board games like Go or video games like Starcraft)
- finding directions on Google maps
- Alexa choosing what words to say or how to say them