Giter Club home page Giter Club logo

pycon-2014-talk's Introduction

Games for Science: Creating interactive psychology experiments in Python with Panda3D

Jessica Hamrick
Peter Battaglia

Description

Have you ever wanted to play video games while also contributing to science? In psychology experiments developed by myself and Peter Battaglia, participants are immersed in an interactive 3D world which is experimentally well-controlled, yet also extremely fun. This talk will explain how we created these "game-like" experiments in Python using the Panda3D video game engine.

Abstract

How do you create a psychology experiment which is engaging and enjoyable for participants, yet also well-controlled by scientific standards? In this talk, I will present several real experiments developed by myself and my colleague Peter Battaglia which immerse participants in a rich, 3D environment. Using Python, our experiments simulate a semi-realistic world and present a level of interactivity similar to that found in popular physics-based video games such as Angry Birds.

To create such "game-like" experiments, we use the Panda3D video game engine. Panda3D exposes the ability to capture key presses, track the mouse, display text, simulate physics, and render 3D graphics, all with the level of precision required by a well-controlled experiment. Furthermore, because Panda3D uses Python, it integrates well with powerful tools such as NumPy and SciPy. The result is that code involved in running behavioral experiments can be reused for model simulations and data analysis.

During this talk, audience members will be able to collectively participate in demos of our experiments. After each demo, I will walk through the steps that were necessary to create the experiment, emphasizing both where there are differences between implementing an interactive experiment versus an actual video game, and how the experiments fit within a larger theme of Python in science.

Generating and viewing slides

The slides are saved in the form of an IPython notebook, in pycon-2014.ipynb. To convert them to HTML slides, you can simply type make, which will generate pycon-2014.slides.html.

To serve these slides locally, you can run the command make serve. They will then be accessible from the URL http://localhost:8000/pycon-2014.slides.html.

Note that you will need the following dependencies installed to generate the slides:

  • pandoc
  • pygments

Running the demos

There are several demos located in the demos folder:

  • will_it_fall.py
  • which_direction.py

These should be run from with the demos folder. All resources are included in this repository (models, textures, stimuli, etc.). You will also need the following dependencies:

pycon-2014-talk's People

Contributors

jhamrick avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.