pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
owyl

owyl - 0.3.0

David Eyk (eykd)

Tags:

Description

You have Pyglet. You've got Rabbyt. But who do your sprites go to for advice? Owyl, of course.

Goals

The goal of Owyl: provide a fast and flexible Behavior Tree framework implemented in python. Owyl trees use nested generators to iterate through your behaviors. The root of the tree always works just like a normal python iterator. If you know how to work with iterators, you know how to work with an Owyl tree. Because Owyl is small and behavior trees are easy to grasp, it's easy to control and extend your AI behaviors.

Trees as Iterators

Trees as iterators give you total control over how a behavior tree integrates with your code: use a for loop, a list comprehension, a generator expression, or manual calls to tree.next(). Run the tree one step, five, or fifty with every frame.

Extending

Writing new behaviors is simple and easy (and soon to be documented!). Any object that corresponds to python's iterator interface and a few simple rules for yielded values will work. Owyl's core behaviors are written as simple generator functions.

More Information

  • Owyl does not depend on any particular framework. You can use it with PyGame, pyglet, PyOpenGL, Panda3D, OGRE, TurboGears, Django, urwid, wxPython, PyQT, and probably 50 million other frameworks, as long as you have Python.
  • Owyl has been tested on python 2.5. It will probably work on 2.6. It most likely won't work on 2.4 (not without some jiggering). Please let me know if you have any trouble with it.
  • For more information on Behavior Trees, see these articles. Remember: AI isn't about math, it's about getting things done.
  • For more information on python generators, see this introduction to generators.

Questions? Comments?

Drop a line below, or bring your questions and comments to the Owyl discussion group.

Changes

Many improvements, enough to warrant version 0.3.

  • Working(!) boids example.
  • Child handling has now been pushed into parent behaviors.
    • Previously, children were only run once, and then re-instantiated on the next iteration (oops!).
    • Parent must call children before yielding them.
    • visit will call the root task of its tree.
  • Non-working decorators now work.
  • I think parallel is really working correctly now.
  • Tracebacks are totally not helpful right now.
    • Debugging is a pain in the neck.
    • This needs to be improved upon.
    • I have no idea how. Tracebacks seem to ignore time spent inside of generators.
    • Some sort of value-added generator-ified traceback may be in order.

Links

Home Page: http://code.google.com/p/owyl/
Source: http://owyl.googlecode.com/files/owyl-0.3.tar.gz

Screenshot


click to view original size

Releases

owyl - 0.3.0 - Jan 15, 2009
owyl - 0.2.2 - Jan 8, 2009
owyl - 0.2.1 - Jan 5, 2009

Pygame.org account Comments

If you wish to leave a comment with your pygame.org account, please sign in first.

January 18, 2009 8:33pm - David Eyk - nickname: (eykd)
Chandler, thanks for the feedback. Owyl is still pretty young, and the example is very new, so I don't doubt it has some ways to go. I've checked in a new version of boids.py with more extensive documentation (read it at http://worlds.eykd.net/owyl/api/examples.boids-module.html). I'll probably make an 0.3.1 release soon, if I can put together a second example soon. Please visit the discussion group at http://groups.google.com/group/owyl-discuss if you have more questions or comments.
January 17, 2009 10:27pm - Chandler Armstrong - nickname: (omnirizon)
Hi there. this looks like nice work and a needed module. I have a concern however.

your example is buried beneath a ton of dependencies and minutia that many game authors may not be familiar with. they look into your module for a solution to a problem: AI. they go to your example for some insight, expecting just to see some bare minimum insight from which they feel they can get jump started. all they want is a simple hotdog to start digesting. your hotdog is simple enough, OK. however you've poured on a ton of fixins that they just can't quite stomach. savvy?

(PS. from xxx import xxx helps not at all either because that makes it even more difficult to see what is your module and what is some other dependency of your program that they are totally unconcerned with)


well that's all. I had some questions about the visitor pattern to vs. another strategy (hint), but i'm not all too familiar with any of it yet to be sure.
January 17, 2009 7:08pm - David Eyk - nickname: (eykd)
Adam, you can run the "Boids" flocking demo in examples/boids.py. There's not much else to run right now--it's a framework for developing game AI, not a game in itself.
January 16, 2009 2:24am - Adam Halley-Prinable - nickname: (magicaxis)
i cant figure out how to get this working! theres no "run" or 'start" or anything. halp!
January 12, 2009 5:32pm - David Eyk - nickname: (eykd)
Sorry for the confusion. Owyl is not dependent on any framework, and will work great with PyGame. The name is just from Rabbyt author Matthew Marshall's suggestion that python needs more game libraries following "A.A. Mylne" naming conventions. ;)
January 12, 2009 3:54am - Rene Dudfield - nickname: (illume)
cool :) I've always been interested in these... but never tried them out in a game.

ps. it's definitely ok for any python game or multimedia related stuff to be on the pygame.org website. It'll be a todo item to make it more explicit that it's ok for everything.
January 10, 2009 2:07pm - Claudio Canepa - nickname: (claxo)
And, at the last two pyweeks there where pygame maintainers telling that pygame site is open for all python game related code, not only those using the pygame lib.
January 9, 2009 5:45pm - Joey Marshall - nickname: (joey101)
I don't think it is dependent on either pyglet or pygame. But if it were there is one possible explanation: there isn't anywhere else to publicize it :P
January 9, 2009 10:18am - pymike - nickname: (pymike)
I have to ask, if this is for pyglet, why is it on the pygame homepage?
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Apr 16, 2014


Apr 13, 2014

Apr 9, 2014

Mar 18, 2014


Mar 15, 2014


Mar 14, 2014

Mar 13, 2014

Mar 11, 2014

Mar 9, 2014

... more!
 
for pygame related questions, comments, and suggestions, please see help (lists, irc)