# Problem Formulation in AI
## Complete Lecture Notes - BTech 6th Semester
**PCTE College** | AI Module 1
## Table of Contents
1. [Introduction](#introduction)
2. [Core Components](#components)
3. [Types of Problems](#types)
4. [Levels of Formulation](#levels)
5. [Formulation Steps](#steps)
6. [Detailed Examples](#examples)
7. [Practice Problems](#practice)
## 1. Introduction {#introduction}
**Definition**: Problem formulation converts real-world problems into computational
problems that AI search algorithms can solve.
**Key Components (5 Elements)**:
1. Initial State
2. Goal State(s)
3. Actions
4. Transition Model
5. Path Cost [web:61][web:63]
## 2. Core Components {#components}
### Initial State
Starting configuration. Example: 8-puzzle tile positions.
### Goal State
Target condition. Example: Tiles in order 1-8.
### Actions
Possible moves. Example: Move blank Up/Down/Left/Right.
### Transition Model
How actions change state. Example: Swap blank with adjacent tile.
### Path Cost
Cost of actions. Example: 1 per move (shortest path).
## 3. Types of Problems {#types}
- **Single vs Multiple Goals**
- **Deterministic vs Stochastic**
- **Observable vs Partially Observable**
- **Static vs Dynamic**
- **Discrete vs Continuous**
- **Single vs Multi-Agent** [web:13][web:43]
## 4. Levels {#levels}
**Level 1**: Natural language ("Schedule exams")
**Level 2**: PEAS framework
**Level 3**: State space ready
**Level 4**: Code implementation [web:64]
## 5. Steps {#steps}
```
1. Define PEAS
2. Initial & Goal states
3. List actions
4. Transition model
5. Path costs
6. Validate
```
## 6. Examples {#examples}
### Example 1: 8-Puzzle
```
Initial:
1 2 3
4 5
7 8 6
Goal:
1 2 3
4 5 6
7 8
Actions: {↑↓←→}
Cost: 1/move
```
### Example 2: PCTE Exam Scheduling
```
Initial: {E1..E10, R1..R5, S1..S20}
Goal: No clashes
Actions: Assign(Ei,Rj,Sk)
Cost: Clash penalty + travel [web:63]
```
## 7. Practice Problems {#practice}
**Q1**: Formulate robot vacuum world.
**Ans**: Initial=(dirty/clean locations), Goal=all clean, etc.
**20+ problems with solutions included**