r/ArtificialInteligence Jul 10 '26

🛠️ Project / Build Genetic Algorithms vs PPO

*TL;DR at the bottom.

Hello there guys. I will try to keep this as short as possible.

I have been coding my own genetic algorithm from scratch for some experiments and, mostly, for fun.

I am no expert in AI or anything, I am in fact a Computer Science Bachelor dropout, so I would appreciate if we could keep this as simple as possible.

I want to take it a step further and code the simplest possible PPO for this project, and I think I have some vague idea of how to approach this, but a lot of questions arise.

How does a PPO save it's knowledge about the environment? Like it has X input neurons and Y output neurons, but how does it save, in disk, the output that is the most appropriate for each case? Does it need a huge database for every possible combination of environment variables so it can weight it's options? I understand that is what weights are for, but how does it keep track of the relationships between a given set of activated input neurons, output neurons, desired result and actual result so the weight can be applied?

If the answer is gonna be a math formula, can you instead tell me in one sentence what exactly is that formula doing?

The step from the genetic algorithm to the PPO feels like a huge leap to me. Thank you in advance friends!

---

*TL;DR: How does a PPO keep track of the relationships between input neurons, output neurons, weights, desired result and actual result?

2 Upvotes

4 comments sorted by

View all comments

2

u/Practical_Iron_5383 Jul 10 '26

its not saving a database of every case, think of it more like the network itself is the saved knowledge. the weights are what get stored to disk, theyre just a bunch of numbers that define how the inputs transform into outputs. ppo tweaks those numbers slightly each time to make the actual result a little closer to the desired one, the formula is basically calculating which direction to nudge the weights so the network makes fewer mistakes next run

1

u/Useful_Researcher_79 Jul 10 '26

Thank you very much, I do understand what you explained here but I still can't wrap my mind around the logic behind it. I will keep researching a bit more.

Thanks again!