1315.45 복합 로봇 도메인에서의 고급 기능 적용 사례

1315.45 복합 로봇 도메인에서의 고급 기능 적용 사례

1. 복합 도메인의 특성

복합 로봇 도메인(complex robot domain)은 다수의 이질적 로봇 유형, 다양한 환경 유형, 복수의 자원 제약, 계층적 태스크 구조 등이 동시에 존재하는 도메인이다. 이러한 도메인에서 PDDL의 고급 기능(타입 시스템, 수치 함수, 파생 술어)의 결합 활용이 특히 효과적이다.

2. 사례 1: 창고 물류 로봇 시스템

2.1 도메인 구조

(define (domain warehouse_logistics)
    (:requirements :strips :typing :numeric-fluents :derived-predicates)

    (:types
        robot - entity
        forklift agv picker_robot - robot
        location - object
        storage_area loading_dock packing_station - location
        item - object
        small_item large_item fragile_item - item
        order - object
    )

    (:functions
        (battery_level ?r - robot)
        (current_load ?r - robot)
        (max_load ?r - robot)
        (weight ?i - item)
        (order_priority ?o - order)
        (distance ?l1 - location ?l2 - location)
        (total_fulfillment_time)
    )

    ;; 파생 술어: 복합 조건 추상화
    (:derived (robot_available ?r - robot)
        (and (not (robot_busy ?r)) (>= (battery_level ?r) 20)))

    (:derived (can_handle ?r - robot ?i - item)
        (and
            (<= (+ (current_load ?r) (weight ?i)) (max_load ?r))
            (imply (large_item ?i) (or (forklift ?r)))
            (imply (fragile_item ?i) (gentle_mode_capable ?r))
        ))

    (:derived (order_ready_to_ship ?o - order)
        (forall (?i - item)
            (imply (item_of_order ?i ?o) (item_packed ?i))))
)

2.2 특화 액션

;; 포크리프트: 대형 물체 전용
(:action forklift_move_pallet
    :parameters (?f - forklift ?pallet - large_item ?from ?to - location)
    :precondition (and
        (robot_at ?f ?from) (item_at ?pallet ?from)
        (robot_available ?f) (can_handle ?f ?pallet))
    :effect (...))

;; AGV: 자동 운반
(:action agv_transport
    :parameters (?a - agv ?i - item ?from ?to - location)
    :precondition (and
        (robot_at ?a ?from) (robot_available ?a)
        (can_handle ?a ?i))
    :effect (...))

;; 피킹 로봇: 소형 물체 수집
(:action pick_item
    :parameters (?p - picker_robot ?i - small_item ?loc - storage_area)
    :precondition (and
        (robot_at ?p ?loc) (item_at ?i ?loc)
        (robot_available ?p) (gripper_free ?p))
    :effect (...))

3. 사례 2: 재난 대응 다중 로봇 시스템

(define (domain disaster_response)
    (:requirements :strips :typing :numeric-fluents :derived-predicates)

    (:types
        robot - entity
        scout_drone rescue_robot supply_robot - robot
        zone - area
        safe_zone danger_zone collapse_zone - zone
        victim supply_cache - target
    )

    (:functions
        (battery_level ?r - robot)
        (rescue_capacity ?r - rescue_robot)
        (supply_quantity ?s - supply_cache)
        (zone_danger_level ?z - zone)
        (total_rescued)
        (total_supplies_delivered)
    )

    ;; 파생 술어: 안전 및 능력 조건
    (:derived (zone_cleared_for_entry ?z - zone)
        (and (zone_scouted ?z) (<= (zone_danger_level ?z) 3)))

    (:derived (rescue_possible ?r - rescue_robot ?v - victim ?z - zone)
        (and (robot_at ?r ?z) (victim_at ?v ?z)
             (zone_cleared_for_entry ?z)
             (> (rescue_capacity ?r) 0)
             (>= (battery_level ?r) 30)))

    ;; 정찰 액션 (드론)
    (:action scout_zone
        :parameters (?d - scout_drone ?z - zone)
        :precondition (and (drone_at ?d ?z) (not (zone_scouted ?z))
                          (>= (battery_level ?d) 10))
        :effect (and (zone_scouted ?z)
                    (decrease (battery_level ?d) 10)))

    ;; 구조 액션
    (:action rescue_victim
        :parameters (?r - rescue_robot ?v - victim ?z - zone)
        :precondition (rescue_possible ?r ?v ?z)
        :effect (and (victim_rescued ?v)
                    (decrease (rescue_capacity ?r) 1)
                    (increase (total_rescued) 1)))
)

4. 사례 3: 스마트 농장 로봇

(:types
    robot - entity
    harvester sprayer inspector_drone - robot
    field - area
    crop_zone greenhouse open_field - field
    crop - object
)

(:functions
    (crop_health ?c - crop)
    (water_level ?f - field)
    (pesticide_remaining ?s - sprayer)
    (harvest_yield ?c - crop)
)

(:derived (needs_watering ?f - field)
    (< (water_level ?f) 30))

(:derived (needs_treatment ?c - crop)
    (and (< (crop_health ?c) 50) (pest_detected ?c)))

(:derived (ready_for_harvest ?c - crop)
    (and (>= (crop_health ?c) 80) (crop_mature ?c)))

5. 복합 도메인 설계의 핵심 패턴

  1. 타입 계층으로 로봇과 환경 분류: 로봇 유형별 능력을 구조적으로 분리
  2. 수치 함수로 자원과 속성 관리: 에너지, 용량, 비용의 정량적 추적
  3. 파생 술어로 가용성과 안전성 추상화: 반복적 복합 조건의 단일 정의
  4. 메트릭으로 최적화 목표 설정: 비용, 시간, 보상의 정량적 최적화

6. 참고 문헌

  • Ghallab, M., Nau, D., & Traverso, P. (2004). Automated Planning: Theory and Practice. Morgan Kaufmann.
  • Haslum, P., Lipovetzky, N., Magazzeni, D., & Muise, C. (2019). An Introduction to the Planning Domain Definition Language. Morgan & Claypool Publishers.
  • Fox, M. & Long, D. (2003). “PDDL2.1: An Extension to PDDL for Expressing Temporal Planning Domains.” Journal of Artificial Intelligence Research, 20, 61–124.