#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    2
    Rep Power
    0

    Lightbulb Simple Planning Agent


    I'm not very good in programming, and this tough algorithm is really killing me. I have no idea on how to program this nor to write an algorithm. please help me!!

    I would be very grateful if u could help me to write the source code. thank you very much.

    function SIMPLE-PLANNING-AGENT (PERCEPT) returns an action
    static: KB, a knowledge base (includes action descriptions)
    p, a plan, initially No plan
    t, a counter, initially 0, indicating time
    local varibales: G, a goal
    current, a current state description

    TELL (KB, MAKE-PERCEPT-SENTENCE(percept, t)
    current <- STATE-DESCRIPTION (KB, t)
    if p=NoPlan then
    G <- ASK (KB, MAKE-GOAL-QUERY(t))
    p <- IDEAL-PLANNER (current, G, KB)

    if p=NoPlan or p is empty then action <- NoOp
    else
    action <- FIRST(p)
    p <- REST(p)
    TELL (KB, MAKE-ACTION-SENTENCE(action, t)
    t <- t+1
    return action
    Last edited by nashadzone; May 25th, 2003 at 09:09 PM.

IMN logo majestic logo threadwatch logo seochat tools logo