TD

Tomas Lozano-Perez (tlp@ai.mit.edu)
Sat, 14 Feb 1998 16:17:27 -0500 (EST)

Hi,

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

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 td.net -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.

Tomas