From 58623e745797c08356bf9efc5216387d53e775b7 Mon Sep 17 00:00:00 2001 From: Etenil Date: Sun, 15 Feb 2026 11:28:32 +0000 Subject: Add readme --- .gitignore | 2 ++ README.org | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 .gitignore create mode 100644 README.org 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 -- cgit v1.2.3