diff options
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | README.org | 40 |
2 files changed, 42 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d8bd30f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +\#*\# +*~
\ No newline at end of file diff --git a/README.org b/README.org new file mode 100644 index 0000000..01f7ef0 --- /dev/null +++ b/README.org @@ -0,0 +1,40 @@ +* FFNN + +This package contains implemenation samples of [[https://en.wikipedia.org/wiki/Feedforward_neural_network][FFNNs]] in [[https://en.wikipedia.org/wiki/Common_Lisp][Common Lisp]]. It is based on the [[https://screwlisp.small-web.org/fundamental/a-better-deep-learning-algorithm/][proposed implementation by Screwlisp]]. + +** Contents + +- [[./algo1.lisp][A simple, single-layer NN that can propose the next step of a tic-tac-toe game]] + +** Example usage + +#+begin_src lisp + (when nil + (let ((training-data + '(;; 1. Horizontal Win (Top Row) + (((foo) (foo) (foo)) + (( ) ( ) ( )) + (( ) ( ) ( ))) + + ;; 2. Vertical Win (Left Column) + (((foo) ( ) ( )) + ((foo) ( ) ( )) + ((foo) ( ) ( ))) + + ;; 3. Diagonal Win (Top-Left to Bottom-Right) + (((foo) ( ) ( )) + (( ) (foo) ( )) + (( ) ( ) (foo))) + + ;; 4. Diagonal Win (Top-Right to Bottom-Left) + ((( ) ( ) (foo)) + (( ) (foo) ( )) + ((foo) ( ) ( ))))) + (board + '(((foo) (foo) ( )) ;; Potential win at (0, 2) + ((bar) ( ) ( )) + (( ) (bar) ( ))))) + (play-ttt board training-data)) + ;; Output: '((0 . 2)) + ) +#+end_src |
