The Generic Gaming Engine Andrew Burke Advisor: Prof. Aaron Cass Abstract Games have long been a source of fascination. Their inherent complexity has challenged.

Slides:



Advertisements
Similar presentations
Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
Advertisements

Lists Chapter 4 Carrano, Data Structures and Abstractions with Java, Second Edition, (c) 2007 Pearson Education, Inc. All rights reserved X.
Tutorial 12: Enhancing Excel with Visual Basic for Applications
Chapter 3 Digital Logic Structures
Chapter 10 Introduction to Arrays
By Xiangzhe Li Thanh Nguyen.  Components and connectors are composed in a specific way in a given system’s architecture to accomplish that system’s objective.
ITEC200 – Week03 Inheritance and Class Hierarchies.
SEERE Workshop, Neum Tempura Retargeting Damyan Mitev, Vladimir Valkanov Plovdiv University “Paisii Hilendarski”
CodeSimian CS491B – Andrew Weng. Motivation Academic integrity is a universal issue Plagiarism is still common today Kaavya Viswanathan (Harvard Student)
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Application architectures
Component and Deployment Diagrams
Information Hiding and Encapsulation
Communication in Distributed Systems –Part 2
Abstraction: Polymorphism, pt. 1 Abstracting Objects.
Using Microsoft SharePoint to Develop Workflow and Business Process Automation Ted Perrotte National Practice Manager, Quilogy, Microsoft Office SharePoint.
Application architectures
CSC 8310 Programming Languages Meeting 2 September 2/3, 2014.
C o n f i d e n t i a l Developed By Nitendra NextHome Subject Name: Data Structure Using C Title: Overview of Data Structure.
CORBA Programming Using ACE/TAO
CASE Tools And Their Effect On Software Quality Peter Geddis – pxg07u.
Powered by DeSiaMore1 Programming Concepts David T. Makota Department of Computing & Information Technology (CIT) The Institute of Finance Management Dar.
PROGRAMMING LANGUAGES The Study of Programming Languages.
Introduction to Java Appendix A. Appendix A: Introduction to Java2 Chapter Objectives To understand the essentials of object-oriented programming in Java.
Programming Logic Program Design. Objectives Steps in program development Algorithms and Pseudocode Data Activity: Alice program.
Aurora: A Conceptual Model for Web-content Adaptation to Support the Universal Accessibility of Web-based Services Anita W. Huang, Neel Sundaresan Presented.
2.2 A Simple Syntax-Directed Translator Syntax-Directed Translation 2.4 Parsing 2.5 A Translator for Simple Expressions 2.6 Lexical Analysis.
CIS Computer Programming Logic
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
Java Class Syntax CSIS 3701: Advanced Object Oriented Programming.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
DEPARTMENT OF COMPUTER SCIENCE & TECHNOLOGY FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UWA WELLASSA 1 CST 221 OBJECT ORIENTED PROGRAMMING(OOP) ( 2 CREDITS.
Programming in Java Unit 2. Class and variable declaration A class is best thought of as a template from which objects are created. You can create many.
{ Graphite Grigory Arashkovich, Anuj Khanna, Anirban Gangopadhyay, Michael D’Egidio, Laura Willson.
Design Document Presentation. Review Quoridor – a board game played on a grid where players must advance tokens across a board to win. Our basic objective:
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Vector Application : A UML Example © Dr. David A. Workman School of EE and CS University of Central Florida Feb. 8, 2001.
Arrays An array is a data structure that consists of an ordered collection of similar items (where “similar items” means items of the same type.) An array.
111 Protocols CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 8) Meyer, B., Applying design by contract,
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Interpretation Environments and Evaluation. CS 354 Spring Translation Stages Lexical analysis (scanning) Parsing –Recognizing –Building parse tree.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
Object Based Programming Chapter 8. 2 In This Chapter We will learn about classes Garbage Collection Data Abstraction and encapsulation.
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
Genetic Programming Lab For Chess Hadar Rottenberg & Nizan Freedman.
Software Engineering Design & UML.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
1 Classes II Chapter 7 2 Introduction Continued study of –classes –data abstraction Prepare for operator overloading in next chapter Work with strings.
STL CSSE 250 Susan Reeder. What is the STL? Standard Template Library Standard C++ Library is an extensible framework which contains components for Language.
Digital Design Using VHDL and PLDs ECOM 4311 Digital System Design Chapter 1.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
1 Chapter 4 Unordered List. 2 Learning Objectives ● Describe the properties of an unordered list. ● Study sequential search and analyze its worst- case.
Programming Languages Meeting 3 September 9/10, 2014.
Announcements Assignment 2 Out Today Quiz today - so I need to shut up at 4:25 1.
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
Application architectures Advisor : Dr. Moneer Al_Mekhlafi By : Ahmed AbdAllah Al_Homaidi.
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Object Based Programming Chapter 8. 2 Contrast ____________________ Languages –Action oriented –Concentrate on writing ________________ –Data supports.
Algorithms and Problem Solving
“Under the hood”: Angry Birds Maze
Object Based Programming
Algorithms and Problem Solving
Teaching a Second Language:
Faculty of Computer Science and Information System
Presentation transcript:

The Generic Gaming Engine Andrew Burke Advisor: Prof. Aaron Cass Abstract Games have long been a source of fascination. Their inherent complexity has challenged the limits of both computing power and human creativity. Similarly, games are also an excellent teaching tool for the exploration of artificial intelligences. The Generic Gaming Engine is a single computer program capable of playing many different two-player board games. With the engine as a framework, students are able to develop and play games of their own design. Game behavior is described using a small programming language and a finite state machine. The generality of the game rules and the utility’s ease of use simplify the game design process, freeing the user from many of the details involved in writing game-playing programs from scratch. Implementation Details Games are described using a finite state machine and a rule set. The finite state machine specifies game progression and terminal conditions. The rule set contains information about pieces, board dimensions, starting conditions, and piece movement rules. This file is actually a small program, written using a small custom programming language. Movement rules and state machine transitions and their resulting actions are written using included primitive functions. These include a wide variety of tests regarding the game state, as well as actions that modify the game state. The program is composed of one main game logic class, several data management classes, and several game data classes. All classes are contained in the genericgamingengine package. The program is written using Sun Java Finite State Machines Finite State Machines are used to describe game progression, note occurrences of unusual game behavior, and denote endgame conditions. State machines are written using the State Machine Compiler, a freeware state machine compilation utility that converts a state machine description file into executable code. A compilation into Java code generates a method for each transition. The SMC language allows state machines to be defined as a listing of states and their associated transitions. Consider the example below: Normal { StandardMove [gameEnded() == false] Normal { display(); getInput(); } } This code fragment creates a state called “Normal” with a transition named “StandardMove.” In order for StandardMove to occur, the boolean function gameEnded() must return false. If this condition is true, the transition’s next state is Normal, with the resulting action of calling the display() and getInput() functions. After each move is made and verified to be legal given the current game state and movement rules, the state machine processes the input and calls the appropriate transition method. This method in turn calls any specified action methods. A state machine must contain at least two states: a “normal” state which gives the actions to be taken after a successful move, and an “ending” state that specifies the game’s concluding conditions. Programming Language Rules are written using a small programming language. A rule program contains the following elements: A game declaration, giving the name of the game. An environment declaration, giving the board dimensions. One or more piece type declarations, detailing the piece’s size, maximum and minimum move distance, and the Boolean functions describing the conditions for this piece’s legal move. A list of board configurations. One configuration is the keyword ‘piece’ followed by an ordered triplet of an initial location, a piece type, and the player to whom the piece will belong. Any functions defined by the user. These are written as compositions of supplied primitives. The programming language was written using the freeware programs JJTree and JavaCC. JavaCC generates a compiler given properly formatted lexical and syntactical grammars. JJTree inserts parse tree generating code into a JavaCC grammar. Data Classes Data is stored in five Java objects. An OrderedPair object stores an ordered pair of the form (x,y). It is used for storing piece size and starting locations. PieceType objects store the information defining a type of piece, e.g. “Bishop” in Chess or “King” in Checkers. This object stores the piece’s name, its minimum and maximum move distance, its size information, and a tree containing the movement function information. A Piece object is a single occurrence of a PieceType. While a PieceType object defines a class of pieces, Piece objects denote who owns particular piece, and assign it a unique identifier value. Multiple Piece objects that reference a single PieceType object may exist. CfgObj objects store the initial board configuration. A CfgObj object is created for each piece on the board at the beginning of the game. Each object contains a string representing the piece’s owner, an OrderedPair object storing the piece’s location, and a PieceType pointer for the piece’s type. GameState objects store the game’s state. This includes an array of the pieces on the board. Engine Classes Core functionality and file processing is handled by five Java classes. Logic and progression are handled by the Game class, which initiates rule set parsing and state machine compilation and contains publicly accessed methods for data access and program control. The ParseExplorer class is responsible for instantiating the programming language compiler and initiating the compilation of the game program. This class also contains depth-first search methods for traversing the parse tree generated from the game program. The GameInstantiator class uses the ParseExplorer class to glean details from the game program and organize them into a usable format. The SMManager class compiles a finite state machine and generates the necessary Java code for its transitions. The GGEMethods abstract class contains the definitions of the engine’s primitive functions. Future WorkDistributability The engine itself will run on a computer acting as a server, to which clients will be able to connect and play, thus allowing an easier medium for competitive play. Simultaneity A corollary to distributability, the engine will be able to handle more than one game at a time, permitting tournament style competitions. User interfaces Since the engine contains methods for obtaining information about the current game state, a more intuitive, adaptive, and pleasing user interface would increase the program’s usability. Primitive list expansion Since much of the game specification is accomplished through the implementation of supplied primitives, the variety of games supported is directly proportional to the variety of primitive functions included in the system. Resources The State Machine Compiler: JJTree and JavaCC: Fig. 2: Finite State Machine for Checkers Fig. 3: Screenshot from a game of Checkers using default output. Fig. 1: Generic Gaming Engine UML Diagram