Tomas Lozano-Perez (
Sat, 14 Feb 1998 16:17:27 -0500 (EST)


I've got one question from one student but I presume others may be

In the TD assignment, you need to write function

pick_move_by_TD(struct board *b, int iter)

which gets called when you use a call like

robots -t -h 20

When pick_move_by_TD is called, the global variable "net" is a pointer
to a Neural Net that has, 100 inputs (the board), 20 hidden units (if
-h 20 is used) and 1 output (the "utility" or "prob of winning").

if (TDNetfile) { /* read in or create TD Net */
if ((net = bpnn_read(TDNetfile)) == NULL) {
printf("Creating new TD network '%s' with %d hidden units\n",
TDNetfile, num_hidden);
net = bpnn_create(net_input_n(nr), num_hidden, 1);

Calling pick_move_by_TD both (a) selects a move to do now based on the
current net and (2) also does one step of backpropagation, by calling
"bpnn_train" (look at train-nn.c to see how this is done). This is
what you need to figure out how to do.

Let me know if there are other questions.