Regia: un linguaggio specifico di dominio per migliorare l'usabilità di VEsNA-ProC

View/ Open
Author
Vassallo, Edoardo <2002>
Date
2026-10-14Data available
2026-10-22Abstract
Nei giochi narrativi, i personaggi non giocanti vengono solitamente definiti dai designer in forma discorsiva e implementati dai programmatori tramite codice che i designer non sono in grado di verificare. Il modello *Belief-Desire-Intention* (Credenza-Desiderio-Intenzione) descrive gli agenti utilizzando concetti già familiari ai designer — ovvero conoscenze, obiettivi e impegni — ma i relativi linguaggi di programmazione richiedono competenze tecniche specifiche, mentre gli strumenti di authoring accessibili, diffusi nello sviluppo di videogiochi, offrono soltanto comportamenti di tipo reattivo.
Questa tesi presenta Regia, un linguaggio specifico di dominio che consente ai designer di creare agenti deliberativi integrati nella narrazione. Sviluppato in collaborazione con lo studio Untold Games, il linguaggio adotta lo scenario — anziché il singolo agente — come unità descrittiva fondamentale. Le *Plot* (trame) suddividono la storia in fasi; i *Role* (ruoli) rappresentano le parti interpretate dagli agenti; i *Playbook* (manuali d'azione) racchiudono comportamenti reattivi che una *Plot* assegna a un *Role* per poi revocarli. Parole chiave sostituiscono gli operatori simbolici e i programmi non contengono variabili. I programmi Regia vengono traspilati in AgentSpeak ed eseguiti dall'interprete Jason all'interno del motore Godot tramite il framework VEsNA, mentre un editor web visualizza le fasi e le transizioni di ogni storia sotto forma di grafo modificabile.
Il linguaggio è stato valutato attraverso un videogioco sviluppato interamente in Regia, benchmark sintetici, un confronto con metodologie orientate agli agenti basate su un metamodello condiviso e un questionario somministrato a 26 partecipanti. I tempi di compilazione crescono in modo quasi proporzionale alla lunghezza del codice sorgente Regia, senza dipendere dal volume di codice generato. Regia copre in modo più esaustivo i concetti dei sistemi multi-agente relativi alla fase di esecuzione (*runtime*) Non-playable characters in narrative games are usually specified by designers, in prose, and implemented by programmers, in code the designers cannot verify. The Belief-Desire-Intention model describes agents through the notions designers already use for characters, their knowledge, goals, and commitments, but its programming languages assume a programming background, while the accessible authoring tools common in game development offer only reactive behaviour.
This thesis introduces Regia, a domain-specific language through which designers write deliberative agents as part of a story. Developed together with the studio Untold Games, the language takes the scenario, rather than the single agent, as its unit of description. Plots divide a story into phases; Roles stand for the parts agents play in it; Playbooks package reactive behaviour that a Plot assigns to a Role and later withdraws. Keywords replace symbolic operators, and programs contain no variables. Regia programs are transpiled into AgentSpeak and executed by the Jason interpreter inside the Godot engine, through the VEsNA framework, while a web-based editor displays the phases and transitions of each story as an editable graph.
The language was assessed through a game developed entirely in Regia, synthetic benchmarks, a comparison with agent-oriented methodologies based on a shared metamodel, and a questionnaire with 26 participants. Compilation time scales close to proportionally with the length of the Regia source, and is not driven by the volume of generated code. Regia covers the runtime concepts of agent systems more fully than their design-time concepts, in line with its focus on narrative. Participants unfamiliar with the language, most with a computing background, read it accurately, and their errors in writing it were mostly slips of syntax or declaration; the Role construct was the main source of misunderstanding. An evaluation with designers who do not program is left to future work.
Type
info:eu-repo/semantics/masterThesisCollections
- Laurea Magistrale [8404]

