RT Journal Article T1 Query-enabled behavior trees A1 Florez-Puga, Gonzalo A1 Gómez Martín, Marco Antonio A1 Gómez Martín, Pedro Pablo A1 Díaz Agudo, María Belén A1 González Calero, Pedro Antonio AB Artificial intelligence in games is typically used for creating player's opponents. Manual editing of intelligent behaviors for nonplayer characters (NPCs) of games is a cumbersome task that needs experienced designers. Our research aims to assist designers in this task. Behaviors typically use recurring patterns, so that experience and reuse are crucial aspects for behavior design. The use of hierarchical structures like hierarchical state machines, behavior trees (BTs), or hierarchical task networks, allows working on different abstraction levels reusing pieces from the more detailed levels. However, the static nature of the design process does not release the designer from the burden of completely specifying each behavior. Our approach applies case-based reasoning (CBR) techniques to retrieve and reuse stored behaviors represented as BTs. In this paper, we focus on dynamic retrieval and selection of behaviors taking into account the world state and the underlying goals. The global behavior of the NPC is dynamically built at runtime querying the CBR system. We exemplify our approach through a serious game, developed by our research group, with gameplay elements from first-person shooter (FPS) games. PB IEEE SN 1943-068X SN 1943-0698 YR 2009 FD 2009-11-10 LK https://hdl.handle.net/20.500.14352/133561 UL https://hdl.handle.net/20.500.14352/133561 LA eng DS Docta Complutense RD 19 mar 2026