행동의 형식적 모델링 (Formal Modeling of Actions)
1. 개요
AI 플래닝에서 행동(action)은 세계 상태를 변화시키는 원자적(atomic) 단위로, 전제 조건(precondition), 추가 효과(add effect), 삭제 효과(delete effect)의 세 구성 요소로 형식화된다. 이 형식적 모델링에 의해 계획기가 행동의 적용 가능성과 상태 변화를 추론할 수 있다.
2. 행동의 구조
2.1 행동 스키마 (Action Schema)
행동 스키마는 매개변수를 가지는 행동의 일반화된 정의이다.
a(\vec{x}) = \langle \text{name}, \vec{x}, \text{pre}(\vec{x}), \text{eff}^+(\vec{x}), \text{eff}^-(\vec{x}) \rangle
| 요소 | 기호 | 설명 |
|---|---|---|
| 이름 | name | 행동의 식별자 |
| 매개변수 | \vec{x} | 행동이 참조하는 객체 변수 |
| 전제 조건 | \text{pre}(\vec{x}) | 행동 실행을 위해 참이어야 하는 조건 |
| 추가 효과 | \text{eff}^+(\vec{x}) | 행동 후 참이 되는 명제 |
| 삭제 효과 | \text{eff}^-(\vec{x}) | 행동 후 거짓이 되는 명제 |
PDDL에서의 행동 정의
(:action move
:parameters (?robot - robot ?from ?to - location)
:precondition (and (at ?robot ?from)
(connected ?from ?to))
:effect (and (at ?robot ?to)
(not (at ?robot ?from))))
행동의 인스턴스화 (Grounding)
행동 스키마의 변수를 구체적 객체로 대치하면 인스턴스화된(grounded) 행동이 된다.
스키마: move(?robot, ?from, ?to)
인스턴스: move(robot1, room_A, room_B)
인스턴스화된 행동의 전제 조건과 효과는 구체적 명제가 된다.
상태 전이
행동 a가 상태 s에 적용되면:
\gamma(s, a) = \begin{cases} (s \setminus \text{eff}^-(a)) \cup \text{eff}^+(a) & \text{if } \text{pre}(a) \subseteq s \\ \text{undefined} & \text{otherwise} \end{cases}
3. 로봇 행동의 모델링 예시
| 로봇 행동 | 매개변수 | 전제 조건 | 추가 효과 | 삭제 효과 |
|---|---|---|---|---|
| move | robot, from, to | at(robot, from), connected(from, to) | at(robot, to) | at(robot, from) |
| pick | robot, obj, loc | at(robot, loc), on(obj, loc), gripper_empty(robot) | holding(robot, obj) | on(obj, loc), gripper_empty(robot) |
| place | robot, obj, loc | at(robot, loc), holding(robot, obj) | on(obj, loc), gripper_empty(robot) | holding(robot, obj) |
| charge | robot, station | at(robot, station), low_battery(robot) | charged(robot) | low_battery(robot) |
4. 확장된 행동 모델
4.1 조건부 효과 (Conditional Effects)
행동의 효과가 조건에 따라 달라지는 경우이다.
(:effect (and (on ?obj ?to)
(when (fragile ?obj) (damaged ?obj))))
4.2 듀레이티브 액션 (Durative Actions)
행동의 시작, 진행, 종료에 시간을 부여한다 (PDDL 2.1 이상).
(:durative-action move
:parameters (?r - robot ?from ?to - location)
:duration (= ?duration 10)
:condition (at start (at ?r ?from))
:effect (and (at end (at ?r ?to))
(at start (not (at ?r ?from)))))
5. 참고 문헌
- Ghallab, M., Nau, D., & Traverso, P. (2016). Automated Planning and Acting. Cambridge University Press.
- Fox, M., & Long, D. (2003). “PDDL2.1: An Extension to PDDL for Expressing Temporal Planning Domains.” JAIR, 20, 61-124.
| 버전 | 날짜 | 변경 사항 |
|---|---|---|
| v0.1 | 2026-04-05 | 초안 작성 |