1 / 13

Finite State Machines using Alice

Finite State Machines using Alice. Stephen Cano CIS 4914 Senior Project Wednesday December 5th. Project Summary.

ontiveros
Télécharger la présentation

Finite State Machines using Alice

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Finite State Machines using Alice Stephen Cano CIS 4914 Senior Project Wednesday December 5th

  2. Project Summary • Motivation: In order to teach AI in a University setting, specifically high level AI algorithms such as Finite State Machines, there needs to be a foundational environment to work in. • Save students the time of building characters or settings for artificial intelligence and instead focus on the algorithms themselves

  3. Project Summary • Problem: Can a successful Finite State Machine be assembled in the Alice programming environment? • Alice is a tool made to teach beginners how to program, but contains the ability to easily render a 3D world (free at http://www.alice.org) • Is Alice’s “simple” environment enough to handle high-level programming concepts?

  4. Project Summary • Solution: Create a 3D world with a single actor that is controlled by a finite state machine • User interaction adds additional states and extra situations to the FSM • Start simple and build up, seeing what Alice can and cannot handle

  5. Literature Search • Anon, http://www.alice.org, Carnigie Mellon (as-of Oct 10th) • Alice tutorials and other work done in Alice • Steve Rabin, AI Game Programming Wisdom 2,Charles River Media (Dec 2003) • What is a Finite State Machine? • Good examples for single-actor FSM • How to debug and enhance your finite state machine • Ian Millington, Artificial Intelligence for Games,Morgan Kaufmann (June 2006) • More basic information around Finite State Machines • “Ant colony” finite state machine involving many actors

  6. Work Performed • In Alice, created a single-actor finite state machine • Main actor, the “penguin” character, goes between 3 different states when left to run, and can enter two different states based on user interaction. • Created two “objects”the user can put intothe scene

  7. State Diagrams

  8. Main functions • Penguin.FSM: • Main “always running” function, had a looped action that shows the finite state machine has entered a certain state. • Example: if in “roam” state, call Penguin.roam, which makes the penguin take a few steps • Also contains a check to see if conditions have been met to enter a new state

  9. Main functions • Penguin.Statecheck • Checks the environment of the character to see if the state needs to be changed • Performs the necessary actions for pre- and post-state change processing • Example: Sit down to eat when hungry, turn to run and hide when scared

  10. Conclusions: Positive • While missing some high-level functionality, a simple FSM can be built in Alice • Enough functionality exists for the purpose of educational venturesin AI. • Very fun, easy to use

  11. Conclusions: Negative • FSM not as “smart” as it could be due to programming limitations • If/Else statements only good available logic • Animations must finish before “moving” on, cannot have multiple threads running to constantly check states • Example: Penguin will not notice fear-enducing skeleton until he is done with his walk cycle • Cannot dynamically add objects to the environment

  12. Future Work • Could a more skilled Alice animator create sharper state transitions? • Can the Java base of Alice be directly modified to be more inclusive of AI technology? • Can other AI algorithms also be replicated in Alice? • Is there a better programming environment for educational purposes of AI?

  13. Q/A time and quick notes • Thanks to Professor Schmalz, Dr. Dankel, and my fellow Senior class • I wish you all a great winter break, and a great spring semester!

More Related