Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 70 additions & 69 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,69 +1,70 @@
# -*- coding: utf-8 -*-
"""setup -- setuptools setup file for Owyl.

$Author$\n
$Rev$\n
$Date$
"""

__author__ = "$Author$"[9:-2]
__revision__ = "$Rev$"
__date__ = "$Date$"[7:-2]

__version__ = "0.3"
__release__ = '.r'.join((__version__, __revision__))

__description__ = "The goal of Owyl: provide a fast and flexible Behavior Tree library implemented in python."
__long_description__ = """You have Pyglet. You've got Rabbyt. But who do your sprites go to for advice? Owyl, of course.

The goal of Owyl: provide a fast and flexible Behavior Tree library implemented in python. For more information on Behavior Trees, see the articles at http://aigamedev.com/hierarchical-logic

"""
__classifiers__ = ["Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Games/Entertainment",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries",]

import sys

try:
import setuptools
except ImportError:
from ez_setup import use_setuptools
use_setuptools()

from setuptools import setup, find_packages

INSTALL_REQUIRES=[]
ZIP_SAFE = True

setup(
name = "owyl",
version = __version__,
author = "David Eyk",
author_email = "eykd@eykd.net",
url = "http://code.google.com/p/owyl/",
description = __description__,
long_description = __long_description__,
download_url = "http://code.google.com/p/owyl/downloads/list",
classifiers = __classifiers__,

package_dir = {'': 'src',},
packages = find_packages('src'),

include_package_data = True,
exclude_package_data = {'src':['*.c', '*.h', '*.pyx', '*.pxd', '*.g']},
#data_files=['src/data',],

install_requires=INSTALL_REQUIRES,
zip_safe = ZIP_SAFE,

test_suite = "nose.collector",
)

# -*- coding: utf-8 -*-
"""setup -- setuptools setup file for Owyl.

$Author$\n
$Rev$\n
$Date$
"""

__author__ = "$Author$"[9:-2]
__revision__ = "$Rev$"
__date__ = "$Date$"[7:-2]

__version__ = "0.4"
__release__ = '.r'.join((__version__, __revision__))

__description__ = "The goal of Owyl: provide a fast and flexible Behavior Tree library implemented in python."
__long_description__ = """You have Pyglet. You've got Rabbyt. But who do your sprites go to for advice? Owyl, of course.

The goal of Owyl: provide a fast and flexible Behavior Tree library implemented in python. For more information on Behavior Trees, see the articles at http://aigamedev.com/hierarchical-logic

"""
__classifiers__ = ["Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Games/Entertainment",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries",]

import sys

try:
import setuptools
except ImportError:
from ez_setup import use_setuptools
use_setuptools()

from setuptools import setup, find_packages

INSTALL_REQUIRES=[]
ZIP_SAFE = True

setup(
name = "owyl",
version = __version__,
author = "David Eyk",
author_email = "eykd@eykd.net",
maintainer="Christopher Toth",
maintainer_email="q@q-continuum.net",
url = "https://github.com/ctoth/owyl",
description = __description__,
long_description = __long_description__,
classifiers = __classifiers__,

package_dir = {'': 'src',},
packages = find_packages('src'),

include_package_data = True,
exclude_package_data = {'src':['*.c', '*.h', '*.pyx', '*.pxd', '*.g']},
#data_files=['src/data',],

install_requires=INSTALL_REQUIRES,
zip_safe = ZIP_SAFE,

test_suite = "tests",
)

145 changes: 73 additions & 72 deletions src/owyl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,72 +1,73 @@
# -*- coding: utf-8 -*-
"""owyl -- Owyl Behavior Trees

Behavior Trees are a form of U{hierarchical
logic<http://aigamedev.com/hierarchical-logic>}, and are quite useful
and flexible for implementing game AI.

Owyl implements a behavior tree using nested iterators/generators. A
top-level generator function, L{visit} (implementing the Visitor
Pattern), iterates through the tree, descending into child generators
as they are yielded, and passing yielded termination status values to
the parent generators.

Nested Generators
=================

Tasks in the behavior tree are implemented as iterators (typically
being generator functions wrapped by the L{task} decorator
function).

The first call to the task is at tree-building time. All passed
arguments should be for static initialization. The task should
return a factory function which itself should return an iterator.

The factory function should accept **kwargs, which should be
combined with the initialization keyword arugments and passed to the
iterator at construction time.

The iterator must yield values of None, True, False, or a child
iterator. An iterator that yields child iterators must be ready to
accept values yielded by the child. (See Termination Status Values,
below.)


Termination Status Values
=========================

As mentioned, iterators in the tree may yield values of None, True,
False, or a child iterator:

- B{None:} May be used to defer execution for another pass from the
scheduler. An iterator yielding None will be queried again.

- B{True:} Termination value signalling successful execution.

- B{False:} Termination value signalling unsuccessful execution, or
failure. Note: this is not considered an error value.

True errors or exceptions should C{raise} the appropriate C{Error}
or C{Exception}.

For more information, see the discussion at
U{http://aigamedev.com/hierarchical-logic/termination-status}.

For more information on Behavior Trees and hierarchical logic, please
see U{http://aigamedev.com/hierarchical-logic} and
U{http://aigamedev.com/hierarchical-logic/advice-2}.

Copyright 2008 David Eyk. All rights reserved.

$Author$\n
$Rev$\n
$Date$
"""

__author__ = "$Author$"[9:-2]
__revision__ = "$Rev$"[6:-2]
__date__ = "$Date$"[7:-2]

from core import *
from decorators import *
from blackboard import *
# -*- coding: utf-8 -*-
"""owyl -- Owyl Behavior Trees

Behavior Trees are a form of U{hierarchical
logic<http://aigamedev.com/hierarchical-logic>}, and are quite useful
and flexible for implementing game AI.

Owyl implements a behavior tree using nested iterators/generators. A
top-level generator function, L{visit} (implementing the Visitor
Pattern), iterates through the tree, descending into child generators
as they are yielded, and passing yielded termination status values to
the parent generators.

Nested Generators
=================

Tasks in the behavior tree are implemented as iterators (typically
being generator functions wrapped by the L{task} decorator
function).

The first call to the task is at tree-building time. All passed
arguments should be for static initialization. The task should
return a factory function which itself should return an iterator.

The factory function should accept **kwargs, which should be
combined with the initialization keyword arugments and passed to the
iterator at construction time.

The iterator must yield values of None, True, False, or a child
iterator. An iterator that yields child iterators must be ready to
accept values yielded by the child. (See Termination Status Values,
below.)


Termination Status Values
=========================

As mentioned, iterators in the tree may yield values of None, True,
False, or a child iterator:

- B{None:} May be used to defer execution for another pass from the
scheduler. An iterator yielding None will be queried again.

- B{True:} Termination value signalling successful execution.

- B{False:} Termination value signalling unsuccessful execution, or
failure. Note: this is not considered an error value.

True errors or exceptions should C{raise} the appropriate C{Error}
or C{Exception}.

For more information, see the discussion at
U{http://aigamedev.com/hierarchical-logic/termination-status}.

For more information on Behavior Trees and hierarchical logic, please
see U{http://aigamedev.com/hierarchical-logic} and
U{http://aigamedev.com/hierarchical-logic/advice-2}.

Copyright 2008 David Eyk. All rights reserved.

$Author$\n
$Rev$\n
$Date$
"""
from __future__ import absolute_import

__author__ = "$Author$"[9:-2]
__revision__ = "$Rev$"[6:-2]
__date__ = "$Date$"[7:-2]

from .core import *
from .decorators import *
from .blackboard import *
Loading