View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Be the first to rate this file! 3 Downloads (last 30 days) File Size: 4.42 KB File ID: #32259 Version: 1.0

Bindings to Course Coding (tile coding) for Reinfocement Learning.



Matlab bindings to C code for Course Coding.

| Watch this File

File Information

Description of Tile Coding
This is an implementation of grid-style tile codings. Here we provide a procedure, "getTiles", that maps real
variables to a list of tiles.

Please see for more information.

Description of bindings
The "getTiles" function is exposed to Matlab through the MEX (Matlab EXecutable) API. Requires a system with a C compiler (see "doc mex" in Matlab for more information).

Required Products MATLAB Compiler
MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
20 Feb 2012 Sergio

Sergio (view profile)

I have followed these instructions to surmount the gcc version:

But running in Matlab:

variables = 0.25*ones(4,1);
numTilings = 32;
memorySize = 4^4*numTilings;
tiles = getTiles(variables, numTilings, memorySize)

it outuputs this error:
??? Attempted to access getTiles__rndseq__(449); index out of bounds because

Error in ==> getTiles>hashCoordinates at 70
sum = sum + getTiles__rndseq__(floor(index));

Error in ==> getTiles at 50
tiles(i) = hashCoordinates(coordinates,memorySize);

Indeed getTiles__rndseq__is a scalar equal -1.4845e+09.

Does it make any sense?

Comment only
20 Feb 2012 Sergio

Sergio (view profile)

Hi, I am sorry, but I have not figured how to use your Tile Coding functions. I am able to compile the c file and get the mexa64.

However I do not understand well how to use it. I am lacking some understanding of the input variables.

For instance, where do I set the width of the tiles, perhaps indirectly based on the number of tilings and the total number of tiles?
Where do I set the range of values to grid?
Can I set the displacement vector?
How can avoid hashing if my system is plenty of memory but I want to increase speed?

Thank you very much in advance!!!

Comment only

Contact us