33 research outputs found

    Pac-Man Conquers Academia: Two Decades of Research Using a Classic Arcade Game

    Get PDF

    Creación de bots para Ms-Pacman basados en gramáticas evolutivas

    Get PDF
    Desde el nacimiento de los videojuegos la inteligencia artificial ha ido de la mano de estos, ya sea aplicando técnicas para el comportamiento de personajes, estrategias de los enemigos, trazado de rutas, etc. Queremos experimentar en nuestro trabajo con la evolución gramatical (una variante de la programación genética) para evolucionar bots cuyo comportamiento se genera desde la derivación de reglas gramaticales, y ver qué resultados da a la hora de aprender a jugar. Para ello hemos experimentado evolucionando un bot para el juego Ms. Pac-Man vs Ghosts, un famoso arcade que posee varios subobjetivos como sobrevivir el mayor tiempo posible, comer la mayor cantidad de píldoras, comer tantos fantasmas como se pueda o pasarse tantos niveles como se pueda antes de que nos coja un fantasma. Concretamente hemos experimentado y mostramos resultados para controladores basados primero en gramáticas que proporcionaban secuencias de movimientos, generando conceptualmente un autómata, mejorándolos luego introduciendo símbolos condicionales. Tras eso abandonamos los autómatas y las secuencias de acciones repetidas en bucle por árboles de decisión, los cuales generamos con varias gramáticas diferentes, con acciones de bajo, medio y alto nivel respectivamente. Para todas ellas analizamos sus resultados y sacamos conclusiones. Experimentamos también con diversas mejoras a la evolución gramatical, como son: Optimización multi-objetivo: Por lo útil de poder modificar el comportamiento del bot con simplemente cambiar las funciones de evaluación del algoritmo, para alcanzar subobjetivos que consideramos más importantes en una determinada situación, y combinarlos entre sí. Operadores de cruce y mutación especializados, como cruce LHS y mutación neutral, que mejoren el rendimiento del algoritmo en tiempo y resultados. En definitiva, en este trabajo mostraremos que el enfoque basado en evolución gramatical tiene muchas posibilidades de mejora y consigue buenos resultados a la hora de desarrollar bots que aprendan a jugar a videojuegos. Para Pac-Man obtienen puntuaciones muy altas y completan varios niveles, superando incluso a los bots hechos a mano u otros bots evolutivos conocidos

    Single- versus Multiobjective Optimization for Evolution of Neural Controllers in Ms. Pac-Man

    Get PDF
    The objective of this study is to focus on the automatic generation of game artificial intelligence (AI) controllers for Ms. Pac-Man agent by using artificial neural network (ANN) and multiobjective artificial evolution. The Pareto Archived Evolution Strategy (PAES) is used to generate a Pareto optimal set of ANNs that optimize the conflicting objectives of maximizing Ms. Pac-Man scores (screen-capture mode) and minimizing neural network complexity. This proposed algorithm is called Pareto Archived Evolution Strategy Neural Network or PAESNet. Three different architectures of PAESNet were investigated, namely, PAESNet with fixed number of hidden neurons (PAESNet_F), PAESNet with varied number of hidden neurons (PAESNet_V), and the PAESNet with multiobjective techniques (PAESNet_M). A comparison between the single- versus multiobjective optimization is conducted in both training and testing processes. In general, therefore, it seems that PAESNet_F yielded better results in training phase. But the PAESNet_M successfully reduces the runtime operation and complexity of ANN by minimizing the number of hidden neurons needed in hidden layer and also it provides better generalization capability for controlling the game agent in a nondeterministic and dynamic environment

    Study of Computational Intelligence Algorithms to Detect Behaviour Patterns

    Full text link
    In order to achieve the game flow and increase player retention, it is important that games difficulty matches player skills. As a consequence, to evaluate how people play a game is a crucial component, because detecting gamers strategies in video-games, it is possible to fix the game difficulty. The main problem to detect the strategies is whether attributes selected to define the strategies correctly detect the actions of the player. To study the player strategies, we will use a Real Time Stategy (RTS) game. In a RTS the players make use of units and structures to secure areas of a map and/or destroy the opponents resources. In this work, we will extract the real-time information about the players strategies using a platform base on the RTS game. After gathering information, the attributes that define the player strategies are evaluated using unsupervised learning algorithm (K-Means and Spectral Clustering). Finally, we will study the similitude among several gameplays where players use different strategies.A fin de lograr que el flujo del juego mejore y la captación de jugadores aumente, es importante que la dificultad del juego se ajuste a las habilidades del jugador. Como consecuencia, evaluar como juega la gente un juego es un aspecto importante, porque detectando las estrategias de los jugadores en los vídeo juegos, permite adapta la dificultad del juego. El problema principal para detectar las estrategias es si los atributos seleccionados para definir las estrategias definen correctamente las acciones del jugador. Para estudiar las estrategias de los jugadores, usaremos un juego de estrategia en tiempo real (Reat Time Strategy (RTS) en inglés). En un RTS los jugadores hacen uso de unidades y estructuras para asegurar áreas del mapa y/o destruir los recursos de los oponentes. En este trabajo, extraeremos información en tiempo real acerca de las estrategias usando una plataforma basada en un juego de RTS. Después de recoger la información, los atributos que definen las estrategias de los jugadores son evaluados mediante algoritmos de aprendizaje no supervisado (K-Means y Spectral Clustering). Finalmente, estudiaremos la similitud entre diversas partidas donde los jugadores utilizar diferentes estrategias.Este trabajo ha sido financiado por Airbus Defence & Space (Proyecto Savier: FUAM-076914) y parcialmente por TIN2010-19872

    Behavior Trees in Robotics and AI: An Introduction

    Full text link
    A Behavior Tree (BT) is a way to structure the switching between different tasks in an autonomous agent, such as a robot or a virtual entity in a computer game. BTs are a very efficient way of creating complex systems that are both modular and reactive. These properties are crucial in many applications, which has led to the spread of BT from computer game programming to many branches of AI and Robotics. In this book, we will first give an introduction to BTs, then we describe how BTs relate to, and in many cases generalize, earlier switching structures. These ideas are then used as a foundation for a set of efficient and easy to use design principles. Properties such as safety, robustness, and efficiency are important for an autonomous system, and we describe a set of tools for formally analyzing these using a state space description of BTs. With the new analysis tools, we can formalize the descriptions of how BTs generalize earlier approaches. We also show the use of BTs in automated planning and machine learning. Finally, we describe an extended set of tools to capture the behavior of Stochastic BTs, where the outcomes of actions are described by probabilities. These tools enable the computation of both success probabilities and time to completion

    Policy Search Based Relational Reinforcement Learning using the Cross-Entropy Method

    Get PDF
    Relational Reinforcement Learning (RRL) is a subfield of machine learning in which a learning agent seeks to maximise a numerical reward within an environment, represented as collections of objects and relations, by performing actions that interact with the environment. The relational representation allows more dynamic environment states than an attribute-based representation of reinforcement learning, but this flexibility also creates new problems such as a potentially infinite number of states. This thesis describes an RRL algorithm named Cerrla that creates policies directly from a set of learned relational “condition-action” rules using the Cross-Entropy Method (CEM) to control policy creation. The CEM assigns each rule a sampling probability and gradually modifies these probabilities such that the randomly sampled policies consist of ‘better’ rules, resulting in larger rewards received. Rule creation is guided by an inferred partial model of the environment that defines: the minimal conditions needed to take an action, the possible specialisation conditions per rule, and a set of simplification rules to remove redundant and illegal rule conditions, resulting in compact, efficient, and comprehensible policies. Cerrla is evaluated on four separate environments, where each environment has several different goals. Results show that compared to existing RRL algorithms, Cerrla is able to learn equal or better behaviour in less time on the standard RRL environment. On other larger, more complex environments, it can learn behaviour that is competitive to specialised approaches. The simplified rules and CEM’s bias towards compact policies result in comprehensive and effective relational policies created in a relatively short amount of time

    Understanding computer game culture: the cultural shaping of a new medium

    Get PDF
    In the past few decades, video games have developed from a marginal technological experiment into a mainstream medium. During this period they have gone through several transformations, from arcade machines offering a few minutes of solitary fun for a quarter to monthly subscription-based online MMOs in which thousands of players spend hundreds or even thousands of hours and lead a significant part of their social life as a fantasy character. But what is it that has driven video games? development? Is it technology? Indeed, with every new generation of hardware, game designers were given a broader set of tools for evoking exhilarating experiences. But is not culture at least as important? What would games look like if Tolkien never had written Lord of the Rings, or if Nintendo had not brought Japanese manga drawing styles to the new medium? This book looks at the theoretical challenges and foundations on which to base a cultural shaping approach towards the evolution of video games and proposes a set of concepts for analyzing and describing this process

    A new ant colony optimization model for complex graph-based problems

    Full text link
    Tesis doctoral inédita leída en la Universidad Autónoma de Madrid. Escuela Politécnica Superior, Departamento de Ingeniería Informática. Fecha de lectura: julio de 2014Nowadays, there is a huge number of problems that due to their complexity have employed heuristic-based algorithms to search for near-to-optimal (or even optimal) solutions. These problems are usually NP-complete, so classical algorithms are not the best candidates to address these problems because they need a large amount of computational resources, or they simply cannot find any solution when the problem grows. Some classical examples of these kind of problems are the Travelling Salesman Problem (TSP) or the N-Queens problem. It is also possible to find examples in real and industrial domains related to the optimization of complex problems, like planning, scheduling, Vehicle Routing Problems (VRP), WiFi network Design Problem (WiFiDP) or behavioural pattern identification, among others. Regarding to heuristic-based algorithms, two well-known paradigms are Swarm Intelligence and Evolutionary Computation. Both paradigms belongs to a subfield from Artificial Intelligence, named Computational Intelligence that also contains Fuzzy Systems, Artificial Neural Networks and Artificial Immune Systems areas. Swarm Intelligence (SI) algorithms are focused on the collective behaviour of selforganizing systems. These algorithms are characterized by the generation of collective intelligence from non-complex individual behaviour and the communication schemes amongst them. Some examples of SI algorithms are particle swarm optimization, ant colony optimization (ACO), bee colony optimization o bird flocking. Ant Colony Optimization (ACO) are based on the foraging behaviour of these insects. In these kind of algorithms, the ants take different decisions during their execution that allows them to build their own solution to the problem. Once any ant has finished its execution, the ant goes back through the followed path and it deposits, in the environment, pheromones that contains information about the built solution. These pheromones will influence the decision of future ants, so there is an indirect communication through the environment called stigmergy. When an ACO algorithm is applied to any of the optimization problems just described, the problem is usually modelled into a graph. Nevertheless, the classical graph-based representation is not the best one for the execution of ACO algorithms because it presents some important pitfalls. The first one is related to the polynomial, or even exponential, growth of the resulting graph. The second pitfall is related to those problems that needs from real variables because these problems cannot be modelled using the classical graph-based representation. On the other hand, Evolutionary Computation (EC) are a set of population-based algorithms based in the Darwinian evolutionary process. In this kind of algorithms there is one (or more) population composed by different individuals that represent a possible solution to the problem. For each iteration, the population evolves by the use of evolutionary procedures which means that better individuals (i.e. better solutions) are generated along the execution of the algorithm. Both kind of algorithms, EC and SI, have been traditionally applied in previous NP-hard problems. Different population-based strategies have been developed, compared and even combined to design hybrid algorithms. This thesis has been focused on the analysis of classical graph-based representations and its application in ACO algorithms into complex problems, and the development of a new ACO model that tries to take a step forward in this kind of algorithms. In this new model, the problem is represented using a reduced graph that affects to the ants behaviour, which becomes more complex. Also, this size reduction generates a fast growth in the number of pheromones created. For this reason, a new metaheuristic (called Oblivion Rate) has been designed to control the number of pheromones stored in the graph. In this thesis different metaheuristics have been designed for the proposed system and their performance have been compared. One of these metaheuristics is the Oblivion Rate, based on an exponential function that takes into account the number of pheromones created in the system. Other Oblivion Rate function is based on a bioinspired swarm algorithm that uses some concepts extracted from the evolutionary algorithms. This bio-inspired swarm algorithm is called Coral Reef Opmization (CRO) algorithm and it is based on the behaviour of the corals in a reef. Finally, to test and validate the proposed model, different domains have been used such as the N-Queens Problem, the Resource-Constraint Project Scheduling Problem, the Path Finding problem in Video Games, or the Behavioural Pattern Identification in users. In some of these domains, the performance of the proposed model has been compared against a classical Genetic Algorithm to provide a comparative study and perform an analytical comparison between both approaches.En la actualidad, existen un gran número de problemas que debido a su complejidad necesitan algoritmos basados en heurísticas para la búsqueda de solucionas subóptimas (o incluso óptimas). Normalmente, estos problemas presentan una complejidad NP-completa, por lo que los algoritmos clásicos de búsqueda de soluciones no son apropiados ya que necesitan una gran cantidad de recursos computacionales, o simplemente, no son capaces de encontrar alguna solución cuando el problema crece. Ejemplos clásicos de este tipo de problemas son el problema del vendedor viajero (o TSP del inglés Travelling Salesman Problem) o el problema de las N-reinas. También se pueden encontrar ejemplos en dominios reales o industriales que generalmente están ligados a temas de optimización de sistemas complejos, como pueden ser problemas de planificación, scheduling, problemas de enrutamiento de vehículos (o VRP del inglés Vehicle Routing Problem), el diseño de redes Wifi abiertas (o WiFiDP del inglés WiFi network Design Problem), o la identificación de patrones de comportamiento, entre otros. En lo referente a los algoritmos basados en heuristicas, dos paradigmas muy conocidos son los algoritmos de enjambre (Swarm Intelligence) y la computación evolutiva (Evolutionary Computation). Ambos paradigmas pertencen al subárea de la Inteligencia Artificial denominada Inteligencia Computacional, que además contiene los sistemas difusos, redes neuronales y sistemas inmunológicos artificiales. Los algoritmos de inteligencia de enjambre, o Swarm Intelligence, se centran en el comportamiento colectivo de sistemas auto-organizativos. Estos algoritmos se caracterizan por la generación de inteligencia colectiva a partir del comportamiento, no muy complejo, de los individuos y los esquemas de comunicación entre ellos. Algunos ejemplos son particle swarm optimization, ant colony optimization (ACO), bee colony optimization o bird flocking. Los algoritmos de colonias de hormigas (o ACO del inglés Ant Colony Optimization) se basan en el comportamiento de estos insectos en el proceso de recolección de comida. En este tipo de algoritmos, las hormigas van tomando decisiones a lo largo de la simulación que les permiten construir su propia solución al problema. Una vez que una hormiga termina su ejecución, deshace el camino andado depositando en el entorno feronomas que contienen información sobre la solución construida. Estas feromonas influirán en las decisiones de futuras hormigas, por lo que produce una comunicación indirecta utilizando el entorno. A este proceso se le llama estigmergia. Cuando un algoritmo de hormigas se aplica a alguno de los problemas de optimización descritos anteriormente, se suele modelar el problema como un grafo sobre el cual se ejecutarán las hormigas. Sin embargo, la representación basada en grafos clásica no parece ser la mejor para la ejecución de algoritmos de hormigas porque presenta algunos problemas importantes. El primer problema está relacionado con el crecimiento polinómico, o incluso expnomencial, del grafo resultante. El segundo problema tiene que ver con los problemas que necesitan de variables reales, o de coma flotante, porque estos problemas, con la representación tradicional basada en grafos, no pueden ser modelados. Por otro lado, los algoritmos evolutivos (o EC del inglés Evolutionary Computation) son un tipo de algoritmos basados en población que están inspirados en el proceso evolutivo propuesto por Darwin. En este tipo de algoritmos, hay una, o varias, poblaciones compuestas por individuos diferentes que representan problems solutiones al problema modelado. Por cada iteración, la población evoluciona mediante el uso de procedimientos evolutivos, lo que significa que mejores individuos (mejores soluciones) son creados a lo largo de la ejecución del algoritmo. Ambos tipos de algorithmos, EC y SI, han sido tradicionalmente aplicados a los problemas NPcompletos descritos anteriormente. Diferentes estrategias basadas en población han sido desarrolladas, comparadas e incluso combinadas para el diseño de algoritmos híbridos. Esta tesis se ha centrado en el análisis de los modelos clásicos de representación basada en grafos de problemas complejos para la posterior ejecución de algoritmos de colonias de hormigas y el desarrollo de un nuevo modelo de hormigas que pretende suponer un avance en este tipo de algoritmos. En este nuevo modelo, los problemas son representados en un grafo más compacto que afecta al comportamiento de las hormigas, el cual se vuelve más complejo. Además, esta reducción en el tamaño del grafo genera un rápido crecimiento en el número de feronomas creadas. Por esta razón, una nueva metaheurística (llamada Oblivion Rate) ha sido diseñada para controlar el número de feromonas almacenadas en el grafo. En esta tesis, varias metaheuristicas han sido diseñadas para el sistema propuesto y sus rendimientos han sido comparados. Una de estas metaheurísticas es la Oblivion Rate basada en una función exponencial que tiene en cuenta el número de feromonas creadas en el sistema. Otra Oblivion Rate está basada en un algoritmo de enjambre bio-inspirado que usa algunos conceptos extraídos de la computación evolutiva. Este algoritmo de enjambre bio-inspirado se llama Optimización de arrecifes de corales (o CRO del inglés Coral Reef Optimization) y está basado en el comportamiento de los corales en el arrecife. Finalmente, para validar y testear el modelo propuesto, se han utilizado diversos dominios de aplicación como son el problema de las N-reinas, problemas de planificación de proyectos con restricciones de recursos, problemas de búsqueda de caminos en entornos de videojuegos y la identificación de patrones de comportamiento de usuarios. En algunos de estos dominios, el rendimiento del modelo propuesto ha sido comparado contra un algoritmo genético clásico para realizar un estudio comparativo, y analítico, entre ambos enfoques
    corecore