fedorajzf / angrybirds Goto Github PK
View Code? Open in Web Editor NEWThis project forked from imanolarrieta/angrybirds
AI Final Project
License: MIT License
This project forked from imanolarrieta/angrybirds
AI Final Project
License: MIT License
###File description (src): #abAPI This API contains the definition of the Angry Birds as an approximate MDP (define states and their successors by manipulating the AngryBirdsGame class in AngryBirds.py). We also define a simplified version of the Game States by extracting all necessary information to run algorthms. #AngryBirds The original code was modified into an object-oriented setting, creating the class AngryBirdsGame. We define the basic methods that will let us extract all game features and manipulate the underlying game mechanics- we will now be able to set levels, get scores, extract pig positions, perform an action, run a certain number of frames, and so on. #characters This file defines all characteristics for pigs and birds, such as mass, life, radius, body, shape and velocity. #evaluation This file contains the codes for generating results and graphs by running it as __main__ and uncommenting the evaluator functions for each feature extractor (PP, NPP, NPPO, NPPS) and algorithm (Q-Learning, RLSVI). #GameAgent The class GameAgent defines the possible actions the bird can take, as well as all feature extractors described in the paper. #DenseLearnerRLSVI In this code the RLSVI algorithm is defined and adapted to our code using the RLSVI_wrapper class. #level This code contains the elements that define all 11 levels (number and positions of pigs and beams). #polygon Similar to characters, this code defines all characteristics of beams. #QLearner This code defines the Q-Learning algorithm based on the class’s code. #sparseLearnerRLSVI This code is DenseLearnerRLSVI.py except we treat sparse matrix operations at all steps. This highly improves the performance when running simulations. #util This file contains the basic tools we used in class to run simulations of the reinforcement learning algorithm. We adapted it so that we can set feedback incorporation after each action or after each episode. ### Codes to run and produce results -To run as human play, run AngryBirds.py as __main__ -To produce the results (including those shown in the paper), run evaluation.py as __main__ and uncomment the evaluator functions for each feature extractor (PP, NPP, NPPO, NPPS) and algorithm (Q-Learning, RLSVI). -To run either RL algorithm, run GameAgent as __main__ and uncommenting the appropriate function (RLSVI_wrapper for RLSVI, and QLearningAlgorithm for Q-Learning). One can also set parameters in calling these functions, for example setting show=True to see what the algorithm takes as actions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.