15-883 Homework #2
Computational Models of Neural Systems

Issued: September 11, 2017. Due: September 18, 2017.

Learning Goal

The purpose of this assignment is to give you a chance to critically evaluate a neural model. How does it behave? Where does it break down? Some of the questions are a bit subjective; use your own judgment and explain your reasoning.

How to Run the CMAC Demo

You should cd to the directory matlab/cmac1, or download the file cmac1.zip and unzip it. When you're ready to begin, type "matlab" to start up Matlab. Then type "run" to start the demo.


  1. Click on the green line to generate sample points for training the CMAC on the sine wave pattern. If you want to get MaxErr (the maximum error on any input value) below 0.2 as quickly as possible, what is your best strategy for selecting training points? Should you select points at random, or can you do better than that? How many points do you need using your approach?

  2. Select the function sin(3x) and click on the "x10" button to generate 10 random training points. Continue clicking "x10" until MaxErr is below 0.2. How many random points did it take to reach this goal? Click on "Reset" and repeat the experiment three more times so you can average your results.

  3. Select the function sin(8x) and click on the "x10" button to generate 10 random points. If you keep generating points, around what value does MaxErr seem to level out?

  4. Once MaxErr has leveled out, change the learning rate from 1.0 to 0.2 and continue training. Can you get MaxERR to go significantly below the previous asymptotic value?

  5. Select the function "Random" and try learning that. Try the "Step" function as well. Do these seem easier or harder than sin(3x)?

  6. Explain, in a few sentences, what makes a function hard for the CMAC to learn.

Dave Touretzky
Last modified: Mon Sep 14 22:16:48 EDT 2015