RLAI Reinforcement Learning and Artificial Intelligence (RLAI)
Downloading and Installing the Tile Coding Software

Tile coding is a good way of representing continuous state variables as binary features for online machine learning such as is common in reinforcement learning.  For further information, see the reference manual, or the textbook description. This page lists the various implementations of tile coding that follow the specification in the reference manual (version 2.1) and compares their efficiency.


Timing Comparisons

These tests were run on a Mac powerbook with 1 G memory, in 2005 or thereabouts. For 10,000 calls to tiles, each with 4 tilings and 2 floats:

Tiles Implementation
Python
Lisp
C++
Python calling C++
Regular:    no collision table
 1.03 sec      
 0.19 sec
 0.02 sec      
 0.09 sec
                unsafe collision table
 1.56 sec
 0.26 sec
 0.06 sec
 0.10 sec
                safe collision table
 1.73 sec
 0.29 sec
 0.04  sec
 0.10 sec
                super safe collision table
 2.19 sec
 0.24 sec
 0.06 sec
 0.10 sec
Wrap:        no collision table  1.50 sec
 1.38 sec(GC)
 0.02 sec
 0.12 sec
                unsafe collision table  1.86 sec
 0.29 sec
 0.05 sec
 0.11 sec
                safe collision table  1.93 sec
 0.29 sec
 0.03 sec
 0.13 sec
                super safe collision table
 1.64 sec
 0.25 sec
 0.05 sec
 0.12 sec
Load:         no collision table
 1.22 sec
 0.27 sec
 0.0003 sec
 5.9 sec
                unsafe collision table
 1.81 sec
 1.57 sec(GC)
 0.0004 sec
 5.8 sec
                safe collision table
 1.96 sec
 0.31 sec
 0.0004 sec
 5.9 sec
                super safe collision table
 1.78 sec
 0.27 sec
 0.0004 sec
 6.4 sec
Load wrap: no collision table
 1.39 sec
 0.21 sec
 0.0002 sec
 5.8 sec
                unsafe collision table
 1.87 sec
 0.30 sec
 0.0003 sec
 5.9 sec
                safe collision table
 1.95 sec
 0.29 sec
 0.0003 sec
 5.8 sec
                super safe collision table
 1.62 sec
 0.35 sec
 0.0005 sec
 5.9 sec


C++ Implementation of Tiles


Python Implementation

This has been tested using Python version 2.3...
For help in using Python, see here.

Installation:

Usage:


Python Calling C Implementation of Tiles

This version allows you to have the extra speed of the C version of tiles but still write your programs in Python.

Requirements:

Installation:

Usage:


Lisp Installation of Tiles

Requirements:

Installation: