1315.14 increase 연산자의 활용과 구문
1. increase 연산자의 정의
increase 연산자는 수치 함수(numeric fluent)의 현재 값에 지정된 양을 더하는 ��신 연산이다. 형식적으로:
s'[f] = s[f] + v
여기서 s[f]는 갱신 전 함수 f의 값, v는 증가량, s'[f]는 갱신 후 값이다.
2. 구문
(increase <function-instance> <numeric-expression>)
<function-instance>는 갱신 대상 함수 인스턴스, <numeric-expression>은 증가량을 나타내는 수치 표현식이다.
3. 기본 활용 패턴
3.1 상수 증가
(increase (delivery_count) 1)
(increase (total_cost) 5)
(increase (error_count ?r) 1)
3.2 함수 값에 의한 증가
(increase (total_distance) (distance ?from ?to))
(increase (current_load ?r) (weight ?obj))
(increase (total_energy_consumed) (energy_cost ?from ?to))
3.3 산술 표현식에 의한 증가
(increase (total_cost) (* (distance ?from ?to) (cost_per_unit_distance)))
(increase (total_time) (/ (distance ?from ?to) (speed ?r)))
(increase (total_weight_transported) (* (weight ?obj) (quantity ?obj)))
4. 로봇 도메인에서의 활용 사례
4.1 이동 거리 누적
(:action move
:parameters (?r - robot ?from - waypoint ?to - waypoint)
:precondition (and (robot_at ?r ?from) (connected ?from ?to))
:effect (and
(not (robot_at ?r ?from))
(robot_at ?r ?to)
(increase (total_distance) (distance ?from ?to))
)
)
4.2 비용 메트릭 누적
(:action perform_task
:parameters (?r - robot ?t - task ?loc - waypoint)
:precondition (and (robot_at ?r ?loc) (task_at ?t ?loc))
:effect (and
(task_completed ?t)
(increase (total_cost) (task_cost ?t))
(increase (tasks_completed_count) 1)
)
)
4.3 데이터 수집량 추적
(:action collect_data
:parameters (?r - robot ?loc - waypoint ?sensor - sensor_type)
:precondition (and (robot_at ?r ?loc) (has_sensor ?r ?sensor))
:effect (and
(data_collected ?r ?loc ?sensor)
(increase (storage_used ?r) (data_size ?sensor))
)
)
4.4 듀레이티브 액션에서의 시간 비례 증가
(:durative-action patrol
:parameters (?r - robot ?area - zone)
:duration (= ?duration (patrol_time ?area))
:effect (and
(at end (area_patrolled ?area))
(at end (increase (total_patrol_time) ?duration))
(at end (increase (total_energy_consumed) (* ?duration (idle_energy_rate ?r))))
)
)
5. increase와 메트릭 최적화의 관계
increase는 계획 비용을 누적하는 데 핵심적으로 사용되며, :metric 절과 결합하여 비용 최적 플래닝을 실현한다:
;; 도메인: 모든 비용 발생 액션에서 total_cost를 increase
(:action move :effect (... (increase (total_cost) (distance ?from ?to))))
(:action pick :effect (... (increase (total_cost) 1)))
(:action place :effect (... (increase (total_cost) 1)))
;; 문제: 총 비용 최소화
(:init (= (total_cost) 0))
(:metric minimize (total_cost))
6. 주의사항
-
초기값 설정:
increase가 적용되는 함수는 반드시 초기값이 설정되어 있어야 한다. 미초기화 함수에increase를 적용하면 결과가 정의되지 않는다. -
음수 증가량:
increase의 증가량이 음수일 수 있다. 이 경우 사실상decrease와 동일한 효과를 가진다. 의미론적 명확성을 위해 감소에는decrease를 사용하는 것이 권장된다. -
오버플로: 이론적으로 무한히 증가할 수 있으므로, 실용적 범위에서 상한 검사가 필요할 수 있다.
7. 참고 문헌
- Fox, M. & Long, D. (2003). “PDDL2.1: An Extension to PDDL for Expressing Temporal Planning Domains.” Journal of Artificial Intelligence Research, 20, 61–124.
- Haslum, P., Lipovetzky, N., Magazzeni, D., & Muise, C. (2019). An Introduction to the Planning Domain Definition Language. Morgan & Claypool Publishers.