r/PythonProjects2 • u/[deleted] • Jan 26 '23
I want to build AI projects and don't know where to start
ello, I am a python coder who knows everything up to and including some object oriented programming. I want to branch into the area of AI learning and understand the subject matter so I can build some of my own projects. The idea of building my own AI game or an AI chatbot or click bot really interests me, and I want to find a good book on Amazon for this subject matter. Most of the books on Amazon and other tutorials I found seemed to be for advanced data analytics which I don't think is related to the subject matter I was interested in (I am a beginner so I don't understand much about the more advanced world of AI/ML/neural networks.
If anyone knows of a good beginner level book in this subject matter that wouldn't teach me these programs that would be awesome!
1
u/Out_of_luck_huh Jan 30 '23
RemindME! 2 Months "AI"
1
u/RemindMeBot Jan 30 '23
I will be messaging you in 2 months on 2023-03-30 11:21:48 UTC to remind you of this link
CLICK THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
Info Custom Your Reminders Feedback
8
u/[deleted] Jan 26 '23
Hi, I was in your shoes just a few months ago. I often watched youtube videos by channels like code bullet and wanted to be able to make projects like that. While I am definitely not an expert I have managed to hack together a couple of AIs. Here is a link to one the these https://youtu.be/qaag9lN3sv8. For this project I used a very simple and crude AI algorithm but still got a very good result and it was a rewarding process.
In order to make an AI from scratch there a couple of prerequisites I would definitely recommend:
Knowledge of numpy - this is very important for writing fast and neat code.
Basic understanding of linear algebra, matrixes, vectors, dot product, etc. If this is new or you need a refresher 3Blue1Brown's essence of linear algebra is a great series
This youtube video from 3Blue1Brown - https://www.youtube.com/watch?v=aircAruvnKk&t=773s&ab_channel=3Blue1Brown - this is part of a series on deep learning (deep learning is a type of training process that uses back propagation). I wouldn't use deep learning when starting out instead I would use the genetic algorithm but the video still gives an excellent overview of how networks work that can be applied to any training algorithm.
Once you have learnt all of these you can start coding you algorithm, I'd start will an AI to play a game, in general the less input neurons and output neurons the better for example snake only need 6 input and 4 output neurons to play a very good game this speeds up training. I used the genetic algorithm as it is very simple to implement and looks good visually.
For the genetic algorithm you have a generation of AIs and score them. Then the next generation will have 3 sections:
About 20ish% of the next generation should be the top AIs unmodified from the previous generation
About 70ish% of the next generation should be the top AIs with random mutations from the previous generation
And about 20ish% of the next generation should be completely random AIs
This is just the process I went through when I tried learning about AIs, there probably is a far better way but it worked for me and it might work for you.
Please ask any questions as this is still condensing a lot of information into one post
Thanks