A bnf grammar is a good starting point to specify a language game. The grammar provides possible action verbs, nouns and adjectives. Possible requests send to the robot are formulated in the syntax of the grammar.
For the example of a warehouse robot, possible utterances are:
Visual Question Answering (VQA)
Interaction 1: Count Query
Speaker (Human): "How many boxs are on Conveyor 1?"
Hearer (Robot): "Answer: 4."
Interaction 2: Attribute Query
Speaker (Human): "What color is the parcel at Rack A Level 2?"
Hearer (Robot): "Answer: blue."
Interaction 3: Location Query
Speaker (Human): "Where is the container?"
Hearer (Robot): "Answer: Pallet 3."
Interaction 4: Presence Query
Speaker (Human): "Is there a item inside Bin 5?"
Hearer (Robot): "Answer: Yes."
Instruction Following (IF)
Interaction 5: Pick & Place Action
Speaker (Human): "Pick up the red parcel from Conveyor 2"
Hearer (Robot): "Executing: Picked up red parcel."
Interaction 6: Movement Action
Speaker (Human): "Move the damaged box to Bin 8"
Hearer (Robot): "Task completed: Moved damaged box."
Interaction 7: Inspection Action
Speaker (Human): "Inspect the barcode at Rack B Level 1"
Hearer (Robot): "Task completed: Inspected barcode."
Interaction 8: Placement Action with Error
Speaker (Human): "Place the blue container to Pallet 9"
Hearer (Robot): "Error: Path obstructed."
These speech acts were not created by a large language model, but are possible vectors from a BNF Grammar, given next. A bnf grammar is a vocabulary list plus grammar rule system and defines what each side can say.
BNF Grammar
<interaction> ::= <speaker_turn> " -> " <hearer_turn>
<speaker_turn> ::= <command> | <query>
<hearer_turn> ::= <acknowledgment> | <answer> | <error_response>
;; Command & Query Structure
<command> ::= <action_verb> " " <target_object> <location_clause>
<query> ::= <vqa_question>
<vqa_question> ::= <count_query> | <attribute_query> | <location_query> | <presence_query>
<count_query> ::= "How many " <object_type> "s are on " <surface> "?"
<attribute_query> ::= "What color is the " <object_type> " at " <location_spec> "?"
<location_query> ::= "Where is the " <object_type> "?"
<presence_query> ::= "Is there a " <object_type> " inside " <container> "?"
<action_verb> ::= "Pick up the" | "Move the" | "Inspect the" | "Place the" | "Scan the"
<target_object> ::= <color> " " <object_type> | <object_type>
<location_clause> ::= " from " <location_spec> | " to " <location_spec> | ""
<location_spec> ::= <surface> | <container> | <shelf_location>
<surface> ::= "Conveyor " <digit> | "Pallet " <digit>
<container> ::= "Bin " <digit> | "Crate " <alpha_code>
<shelf_location> ::= "Rack " <alpha_code> " Level " <digit>
;; Robot Responses
<acknowledgment> ::= "Executing: " <action_description> "." | "Task completed: " <action_description> "."
<action_description> ::= <action_verb_past> " " <target_object>
<action_verb_past> ::= "Picked up" | "Moved" | "Inspected" | "Placed" | "Scanned"
<answer> ::= "Answer: " <answer_content> "."
<answer_content> ::= <digit_string> | <color> | <location_spec> | <boolean>
<error_response> ::= "Error: Object not found." | "Error: Path obstructed."
;; Lexical Elements
<object_type> ::= "box" | "parcel" | "barcode" | "container" | "item"
<color> ::= "red" | "blue" | "green" | "yellow" | "damaged"
<boolean> ::= "Yes" | "No"
<digit_string> ::= <digit> | <digit> <digit_string>
<digit> ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
<alpha_code> ::= "A" | "B" | "C" | "D"
October 14, 2026
BNF Grammar for speaker to hearer interaction for a warehouse robot
Labels:
Game AI
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment