Example is not trained, and I'm srry but training is either slow or it is not working :( .
This is an RL (Reinforcement Learning) AI, so if you thought you could turn this into ChatGPT, you can't, or at least it requires months of training. Credits to Unity for the idea (they made a tool called "ML Agents"). Please give credit, or I will report you. Leave suggestions and bugs in the comments! CHANGELOG: --v1.0.0 Jul 13, 2025: Release! --v1.0.1 Jul 14, 2025: Patched an error that caused missing weights when Compute block was updated. --v1.0.2 Jul 15, 2025: Fixed a bug caused by --v1.0.1 resulting in no weights. --v1.1.2 Jul 16, 2025: Added continuous & discrete options open! --v1.1.3 Jul 22, 2025: Fixed a reward bug in the discrete block. --v1.1.4 Aug 3, 2025: Fixed an issue with the bias and outputs list causing missing nodes. --v1.1.5 Aug 3, 2025: Fixed an issue causing nodes to increase forever. --v1.2.5 Aug 3, 2025: Made rewards more effective depending on the reward amount. --v1.2.6 Aug 5, 2025: Removed the last update since it wasn't necessary. --v1.3.6 Aug 7, 2025: Added inference and by the way, it's my birthday the time I added this :) ! --v2.0.0 Aug 8, 2025: Fixed an issue with the reward causing a MAJOR problem. --v2.0.1 Aug 8, 2025: Added a missing part of v2.0.0. --v2.0.2 Aug 8, 2025: Fixed a problem with the previous update causing "i" to increase forever. --v2.0.3 Aug 8, 2025: Fixed an issue that also causes "i" to increase forever. --v2.1.0 Aug 9, 2025: Added strength for weights as well. --v2.2.0 Aug 10, 2025: Made weights, bias, and outputs can start of as a negative number for discrete, and for discrete and continuous, made bias reach decimals as well. --v2.2.1 Aug 10, 2025: Fixed an issue causing weights to all be -9. --v3.0.0 Aug 10, 2025: Fixed LOTS of major issues and made weights not a fixed value. --v3.0.1 Aug 10, 2025: Added a limit on how high the values can be. --3.0.2 Aug 10, 2025: Fixed an issue causing strongWeights to increase forever. --3.0.2.1 Aug 20, 2025: Added a missing part of inference that was forgotten. --v3.0.3: Fixed an issue from the previous update preventing it from working. --v3.0.4 Decreased size of code, which may or may not help with training. --v3.1.0 Aug 28, 2025: Renamed the bias list to "hidden layer" since bias was something else, and actually added bias. --v3.1.1 Aug 30, 2025: Fixed an issue with bias causing it not to be constant. --v4.0.0 Aug 30, 2025: Added sigmoid and removed discrete, so you will have to use sigmoid instead. :( --v4.0.0.1 Aug 31, 2025: Was wrong about bias again, so removed v3.1.1 additions. v5.0.0: Replaced the original way the agent learn with still Reinforcement Learning, but with gradient descent. v5.1.0: Added "nobias" which just sets the bias to 0 so only the weights handle the training if set to True. --v5.1.1 September 4, 2025: Fixed sigmoid by making it only effect the final output. --v5.2.0 September 5, 2025: Fixed an issue with the gradient descent preventing training. -v5.2.1 September 6, 2025: Fixed an issue causing the script to think the Reward var has not changed. --v5.3.0 September 7, 2025: Fixed an issue with the gradient descent with C/I2 being initialized too high and fixed an issue with just forgetting a single "not" block. --v.5.4.0 September 7, 2025: Fixed an issue where if the costs lists has nothing, it iterates forever and made it so weights can change. --v5.5.0 September 12, 2025: Fixed an issue that causes the outputs to come out random and fixed an issue with the weighted sum calculation. --v5.6.0 September 12, 2025: Added bias to the gradient descent. --v5.6.1 September 12, 2025: Added random values so the gradient descent can pick an value that is probably different. --v5.6.2 September 12, 2025: Fixed another issue with the weighted sum --v5.6.3 September 17, 2025: Added outputs to be random. --v5.7.0 October 2, 2025: Optimized the training algorithm and fixed an issue with the sigmoid function. --v6.0.0 November 4, 2025: Fixed tons of issues and added lots of new features (was working on this for a long time) --v6.1.0 December 3, 2025: Made the learning faster, but sadly broke it while trying to fix an issue (although it was already not working that well) :( --v6.1.1 February 25, 2026: Fixed a learning bug that caused it to reset its learning every learning cycle.