Student Version Basis of AI Backprop Hypertext Documentation

Copyright (c) 1990-2007 by Donald R. Tveter

Making the Programs

This version has a binary compiled for Ubuntu 7.04 in addition to the source code.

To work from the source code make a directory perhaps called back although on my system it is c6 inside the directory back because I have a lot of versions. Move bp.tar.gz to back or wherever. Gunzip the file bp.tar.gz. Then do tar -xf bp.tar. Everything lands in the current directory.

The C++ program assumes the bp.tcl file will be in the current directory, if you want to place it somewhere else look for "bp.tcl" near the end of the file bp.cpp and change the path to the file.

There is a help function that uses firefox to view the hypertext files included. If you want to use a browser other than firefox you need to find the string "firefox" in the bp.html file and substitute the browser of your choice.

The default location to put the hypertext documentation is ~/back, if you don't want it there look for the variable htmlpath in the file bp.tcl and change its value to the location of your choice.

The bp.tcl file gets its geometry parameters from the bp.cpp file, the default is 800x600+0+0, if you want to change this go to the function init in the file bp.cpp and change the values of windwidth, windheight, upperleftx, upperlefty. In the same place you will find the other GUI variables: textcolor, backgroundcolor, maxlines and currentfont which you may want to set to different values.

The bp.tcl program uses the VGA font for most of the entry boxes however some systems do not have this font so you may need to change the entryboxfont variable.

This code has been written to use either 32-bit floating point (float) or 64-bit floating point (double) arithmetic. On System V machines the standard seems to be that all floating point arithmetic is done with double precision arithmetic so double arithmetic is faster than float and therefore this is the default. Other versions of C (e.g. ANSI C) will do single precision real arithmetic. To get 32-bit floating point set the compiler flag FLOAT in the makefile. The function, exp, defined in real.c is double since System V specifies it as double. If your C uses float, change this definition as well.

For the g++ compiler and LINUX you will probably want to use this definition for CFLAGS:

CFLAGS= -s -m486 -O3 -DFLOAT -DLINUX -DUSE_NON_CONST

The particular libraries and their locations vary from system type to system type and even from machine to machine running the same OS. A couple of definitions are present in the makefile, comment out the ones you don't need and uncomment the one you do need. If you find something odd about your system please let me know so I can include it here.

In an old version there was a problem found with the free student version where it crashed on a Sun when the program hits a call to free in the file bp.cpp. This can be solved by removing the two calls to free and the amount of space you waste is minimal.

If you do get bugs on an odd system and you can let me telnet in to your system, preferably on a separate login, not your personal login I will try and fix the problem for you.