1.2

Updates:
  1. none

Assignment
Artificial Neural Networks

Elliott

Copyright 2021 Clark Elliott All rights reserved


Administration

The NN.lisp file source code

Precisely-named submission files for D2L (zipped together):

  • ChecklistNN.html— Copy the HTML source and change no to yes as appropriate: Neural Networks Checklist

  • NN.LISP —Your LISP source code for the NN assignment with comments.

  • MyNN-output.docx (or .txt or .html or .pdf)— Console output, or screenshots of your running examples.

Learning Goals:

At the end of this assignment you will know how to...

  • ...know how to use a basic text editor to edit program files and simple HTML on your computer.

  • ...know how to load and run a simple artificial neural network LISP program.

  • ...know how to train an artificial neuron to recognize different kinds of logic gates.

  • ...know how to write your own LISP code to implement the training of NAND gate and a NOR gate.

  • ...know how to insert text into an HTML file.

  • ...know enough about LISP and LISP COMMENTS to add extensive explanatory comments about how the NN.LISP program works.

The assignment

Preliminary Notes:

  • Download the NN.LISP file and load it into LISP.

  • Be sure to save copies of your source program file as you work: NNA.lisp, NNB.lisp, NNC.lisp and so forth, every twenty minutes or so. This way, if you make a mistake, you can always go back to a previous version without losing more than 20 minutes worth of work.

  • When you are done with development, copy your latest version into NN.lisp for submission to D2L.

  • Use a text editor for this assignment, such as Notepad++, TextEdit, ne, or Emacs.

  • After you are done, and while you are developing, write extensive comments in the LISP code showing that you know how the program works.

  • As you compete the tasks listed in the checklist, then USING A TEXT EDITOR change "no" to "yes". Add any comments needed to the bottom of your checklist file.

Part one:

We will collect output from your running programs from the LISP console and put it in a file called MyNN-output. This can be a Word file, a text file, or an HTML file: .docx, .txt, .html.

  • Try the random-weighted neuron for NOT, then train it and verify that it works. Show neuron creation, the original random behavior, the training, and the final result checked for each input. (Do this for each subsequent neuron condition in this assignment.) Copy and paste from your console output or Emacs buffer into your MyNN-output file to save it. Or, use screen capture to save an image of your console output and put that into your MyNN-output file.

  • Try the random-weighted neuron for AND, then train it and verify that it works. Add your console output to your MyNN-output file.

  • Try the random-weighted neuron for OR, then train it and verify that it works. Add your console output to your MyNN-output file.

Part two:

  • Modify the value for epsilon several times and repeat the above.

  • Add your console output to your MyNN-output file, then, edit the file to annotate what is happening with your changes to epsilon.

    Part three:

    Write the LISP code to train two new neurons, and run them through their paces, as above:

    • train4nand—The exact opposite of AND, that is, reverse the 0s and 1s in the input for the same output.

    • train4nor—The exact opposite of OR, that is, reverse the 0s and 1s in the input for the same output.

    • Repeat the steps in Part one for AND and OR, showing creation of the neuron, the original random behavior, the training, and the final result checked for each input. Check your two new functions NAND and NOR, each with the four inputs 0,0 / 0,1 / 1,0 / 1 1 after training to verify that they work correctly.

    • Copy your console output to your MyNN-output file showing that your new functions work.

    • USING A TEXT EDITOR, add any comments needed to the bottom of your checklist file.

    Submission:

    1. Concatenate your completed checklisNN.html file, your COMMENTED NN.LISP source code, and your MyNN-output.[XXX] file together using standard ZIP format.

    2. Submit to D2L before the deadline.