This is really impressive, considering i’ve only seen AI videos where people have to recreate the whole game to implement the AI, and it was nice to see someone use the values from the original game for once. great job!
It can make more sense when using Machine Learning, you can have more control + speed up the game time to train faster. But I agree, it is nicer to see someone using the original game than making a recreation that looks pretty bad (That is coming from Code Bullet stuff and some other channels, not sure what you may have seen :))
@@mattdanfg the game is still rendering graphics which causes a performance hit, ideally you would use speedhack read everything from memory and completely remove graphics while training
It's interesting to see the AI gravitating towards the meta. The starting spot with sauda is the best possible spot you can place your hero on this map according to a few big bloons youtubers.
I was so sad to realise this is your first video, you are a natural at this. Very engaging and intriguing video. Sad I couldn’t watch more though, keep up the good work!!
I think this is honestly the best btd6 video I have seen. Apart from the AI, getting the memory adresses and offsets for btd6 variables is really impressive considering how notorious il2cpp is.
Also slightly unrelated but the fact the values he was messing with in memory (lives & health) are obfuscated. They use something they called KonFuze, you can actually see it in the diagram early video.
@@sewer56lol I always found it funny that the lives and in-round money in BTD5 steam were obfuscated, but monkey money wasn’t, and could be found via cheat engine in half a minute. The ONE CURRENCY you pay for, and I could give myself infinite of it. Needless to say, it broke any semblance of progression and was quite hilarious
@@HoppingSkipper Monkey Money takes time or money. So maybe, anamolous MM is easily recognized. Most of it has a receipt of some kind I bet. Watch out because NK prefers to shadowban, apparently: Race events will no longer appear to a person caught modding the game. But maybe you don't mind, MM is a kind of personal progress I suppose.
@@LoserHands I never liked any other bloons game enough to buy it so the browser versions are what I play. If NK can tell from the browser, without comparing my IP (as I have a VPN) that my machine has fraudulent MM in the steam version of BTD5, I think I’d have a little more to worry about than not being able to use the game properly.
@@sewer56lol Konfuze is interesting, it not only hides the variables. But it also prevents you from changing them, and detects if you try to. There is a Boolean called HACKER_DETECTED which sets to true if the variables are tampered with
Awesome showcase! If you're willing to break away slightly from true gameplay for the sake of speed and faster training, you can load a speed mod and run the game as fast as the AI (or your pc) could detect and interact with the game. Judging by the towers, crosspaths and positons it chose, it seems plausible it could eventually take on most of the beginner and intermediate maps on chimps, but beyond that would need to formulate actual multi-layered strategies and use tower synergies that aren't just getting 1-2 decent 5th tiers. Hope you experiment more with this, the concept is fascinating.
Your work is simply amazing, And this is the exact kind of content that gets young people excited about computer science topics. Thank you so much for these videos I think the impact your making on the world is much larger than you have considered.
I could honestly watch hours of ai just playing games. It's literally more entertaining than actual let's players with how odd the AI usually is. Nice video. I really hope you come back to this to see if the AI can beat the hardest map on chimps. I'm just curious if it can.
_AI places down Dark Knight, Icicle Impale, Prince of Darkness_ "wow, it figured out the meta upgrades rather quickly" _10:06__ happens_ "🙃" This is the incredible content. Nuff' said.
This is brilliant! You've truly managed to present such complex and interesting material in such an easy to digest and succinct manner, which is accessible for many people. I would love to see more content from you, major props!
Another way of placing towers and upgrading them is to use the key binds, I think this could be even faster as it eliminates the need to scroll through the monkeys and calculate which side of the screen the upgrade GUI will be on.
This video is not only fun to watch but informative and could even inspire people, kids and even young adults, into getting into the field of programming. I think it’s very interesting that the RU-vid video shows all that goes into making this program from cool to cringe (the painstaking part of typing in every single detail and the minute details that make it run smoothly). You should keep making videos like this and have several projects running simultaneously (I know that is costly not only in terms of computers but space, furniture, outside technology for the computers (modems, etc.), electricity, and whatever else I am missing). Be sure to keep making videos like this because they are quality videos that will help grow your channel, keep people interested, and leave the viewer with some knowledge as well as being entertained.
I love videos like this, seeing AI and programming learning to do something that humans can do, maybe even better than humans if given enough time. I would LOVE to see another video on this, maybe an improved version with smarter AI if possible, but even if not I would love to see it, since this one is still so fun to watch
you could cut down the training time for the algorithm by a hefty chunk by analyzing which bloons caused the defeat, and comparing this to a database of what the ai has learned each tower excels at. it would be a little complex to manage, but it would also allow more sophisticated and adaptive strategies and overall improve performance
Considering it's a machine learning algorithm, all he would need to do would be to give it the defeat info, then the ai would decide how best to use that
And maybe have it analyze how far bloons got on the track and which towers and their positions made the bloons not be able to advance as far as they did.
@@atmaweapon3958 Yeah, it would try towers and upgrades until it found one that could solve the loss condition. Obviously there are usually multiple solutions, so I'm curious what kind of order it might use.
@@wingdingfontbro Not sure if that would help or not, since distance traveled on the track isn't as helpful as simply defeating the bloons. Like wouldn't that just skew it towards placing shit at the front of the track so it doesn't go as far?
@@normalcommenter8595 I think the AI might do that at first, but eventually it would learn that the distance is irrelevant as long as it doesn't reach the end of the track. In theory.
A lazy man would just let the ai run with the information it already has. It will still click the upgrade when it has the normal price but now has some coin.
Discounts could be easy to code. He already has the game open in cheat engine, I don't see why he can't find the addresses where the Tower Prices are stored and copy them out?
This is one of the greatest vids I've ever seen. Explanation was so clean too. Quite motivating for an engineering student like myself. Loved it , can't wait to see what else it could do in the future
Laughed my ass off, and a lot of other body parts too with the small notes on the Ninja Monkey placement and BFB parts. Definitely go I to watch more, if you devise to continue using the AI. You're like Dani, but code AI instead.
Damn that’s actually rly amazing. I wonder how it would do in other gamemodes besides chimps, like half cash and alternate bloon rounds, and on harder maps? Which game mode would require the most hours to create a strategy for? It’s fascinating stuff, to be sure
the AI is quite wasteful, so half cash would definitely be difficult for it to learn, maybe even longer than chimps. It would also have a very hard time with harder maps. There is definitely room for improvement though, i might make a sequel to this
this video is really nice to teach kids computer science with, starting with something really simple and working your way up in complexity. really awesome, love ur work
I posted this on Reddit, but like this is such a neat video! I'd love to see it tackle other maps, and maybe give it some extra capabilities to make towers like the dartling more viable. It amazes me you don't even have 100 subs as I write this comment, because this is a very well set-up video!
What if instead of just using the cursor, you used hotkeys to select monkeys and hotkeys to upgrade them? Also, you could use hotkeys to activate abilities. Also also, was the AI unable to use abilities?
In my not-so-expert opinion (I'm a professional software developer but haven't made something similar to this), using hotkeys would have been overall easier and faster to code.
This was so cool, im very new to programming and have been wanting to gain more experience by doing something like this. This video really helps give a general idea of what you did without giving away the entire solution. Do you by chance have any tips for someone who has only taken a semesters worth of a C++ course and wants to get into this sort of stuff?
Nice to see some fellow programmers in here! Keep learning C++ for sure, but learn other languages like C#, Python or JavaScript as well. Look up Evolutionary Algorithms (explained in the video with the fish) and Neural Networks for a good start. This particular project involved some pretty advanced memory manipulation, so if you want to something like this then learn pointers and memory concepts inside and out, which C++ should help heaps with. Good Luck!
I've enjoyed this video all the way through and then wanted to watch more of your videos but there are no more. The quality of this is incredible for it being your first video and I'm looking forward for more.
You should create a course on how to program AI using all of these games as exercises! You would make a killing! And I would for sure be first to sign up! Short of that, perhaps some tutorial videos via a patreon or something? Great work regardless! Looking forward to seeing more!
I love ai and I think I'm going to start learning how to make ai because stuff like this and thinking about other games ai could play is fascinating. Awesome video bro 😁👍
dang I love this. The Code Bullet formula is amazing and I am SO FKIN HAPPY to see someone else tryin it. I love this type of content, but it is rare to find such quality! definitely subbing and sticking around.
very good video! I’m curious to see more of the coding and programs that went into the process, but I’d understand why you would want to omit them for simplicity. One thing I’m curious about is why you decided to use mouse only instead of also using hotkeys?
I actually thought it was the only way to place towers, if I could do this again, i'd definitely use hotkeys. The code will be posted at some point in the future
@@b2stud that's great to hear! I've had a personal project where I have been trying to get exact hitbox info for all towers and maps, but have been kind of stuck lately. I'm really curious to see what you mean by automating the process of finding money's pointer
@@booknook852 im sure i will cover it at some point, but for now, it's basically a home made version of cheat engine that finds the first pointer, which is 650 for money.
The video is great, montage smooth. Fucking fire voice acting for a FIRST VIDEO (how tf can you be that confortable haha). + I love this game. Subscribed. Need more. Love from France my man ❤️
I'd love more of this. I was actually considering how youd even go about making an AI to play bloons earlier today, given it would eventually (at higher levels of skill) need to learn map lay outs and tower synergies.
wow this is freaking insane! im subbed... can't wait to see more! one thing you could also do is look at the pop count per tower price each tower gets, and have the ai go for maximum optimization :)
Hey man, Awesome video! You definitely deserve more subs from it so the only thing I wanted to say to you is to just remind people to subscribe even if it's just for 5 seconds, statistically it works!
Congrats on getting so much well earned success on this video!(I‘m assuming it‘s your first because you‘re channel doesn‘t have any other public videos and the channel was created only a couple of months ago)
This is such an interesting and entertaining (not to mention unique) video! I would love nothing more than to see a sequel video in which you let the AI learn for a couple more weeks striving to reach the highest round on chimps free play or something like that. Something where the ceiling is the limit, not just beating one level on chimps, which can be done several different ways. It would be interesting to see what the AI learns if given total freedom and more time to get as far as possible. It may even outplay some veterans lol
Well this appears to be the only video on your channel If you don't upload any more, then 100% of your videos will be bangers forever ;) But I really look forward to seeing more of the Bloons AI
I'm gonna try to create something like this but as a mod, I've already setup a basic AI that can beat logs on easy and I'll add a proper neural network soon. you can join the discussion in bow's modding discord if you want.
Yea I was fucking around with using python NEAT, using websockets and built a mod to transfer the data I need to the model and send moves to the mod. I never got back to it due to school and work and I never bothered to setup a VM environment to properly train the model, at one point I was using sandboxy to launch 6 instances (I needed to use a steamapi crack for this work properly)
@@karpa.183 is there a different one, I joined one a while ago and it was just a bunch of seemingly young people posting stupid shit. I think it was the nkhook server I don't remember
Hi @b2studios. Awesome content! How many hours went into programming and AI training until you beat the final stage? And how many years do you have spend on learning ML?
3:32 "whenever you enter a new session in bloons tower defense, money is always equal to 650" everyone who unlocked all monkey knowledge: *am i a joke to you?*
that's pretty impressive. I'm wondering, though, if the way the bot was developed would allow for it's use of the in-game keybinds? there's one for the individual towers, which are spread across the different letter keys, and the comma, period and forward slash keys can be used to purchase upgrades. do you reckon that would have made it faster? or would it not have made a difference?
Impressive that you got this to work using the game running in real time. Normally training runs a very high number of iterations and generations. I played BTD5 a decent amount earlier, but haven't tried BTD6. I'm not surprised the fast sniper money ended up as part of more advanced AI's toolkit though. Those are overpowered compared to their cost. In BTD5 i always ended up getting one of those pretty early and maxing out money generating to later max out a mix of super monkeys (temples with max upgrades), fast snipers and the powerful snipers (for damaging zepelins at any point in the map)
This is arguably the most interesting Bloons Td6 video I have ever seen, especially when examining the strange but ultimately effective solutions the AI has come up with.
I think there needs to be a bit of work done with letting the AI change targeting priorities and make use of mouse-controlled towers using anything but dumb luck, though especially this latter bit would likely require some way of reading bloon positioning and I have no idea how complicated that would be with BTD6. Ability use would also make sense as a factor, and here it also seems to be placing towers randomly, though an intelligent placing heuristic seems like it would be the most complicated of all. In terms of further testing, while it's not a constant, you could let the AI have a go at races. This would give it much finer gradation for determining which algorithm performs the best, though I have no idea how you would get past issues with local minimums, of which there are a whole lot.
What do you think about collective training? Where each user can train the ai on specific map with it's difficulty and then share the results to public?
This is actually so cool! I have literally been playing bloons over the past few weeks and learning machine learning over the past few months and am looking for some projects to reinforce my learning with ;). Would you be willing to share what programs you used to do this? Keen to tackle all the coding myself but would love to know the tech stack used.
Nice, I hope you make funny videos if other games too, like you did with monopoly, if you need game ideas, you can ask viewers. :) I like your work, AI is too interesting, when it develops it self
evolutionary algorithms are what you're looking for: to start you want a bot that can behave differently based on its starting conditions (how fast it is, how aggressive it is) 1. create several of bots randomly (could be as little as 10 or as many as 1000 up to you) 2. test them and give them a score based on how well they perform (how far they get, how long they live etc.) 3. keep the ones that have the highest score (could be just 1 or the top 10 again up to you) 4. clone the best bots and mutate their characteristics slightly repeat steps 2-4 with the new population of bots indefinitely until they do what you need them to hope that helps!
Wouldn't it make more sense for tower placement to just use hotkeys? Same for buying upgrades. Mouse control will still be needed for some things, but hotkeys can greatly simplify the process. Also at 4:09 you made a mistake in the text on screen. Impoppable has all 23 towers; it's CHIMPS that only has 22. You also never gave the AI the ability to activate abilities.
How did you teach the AI to save up? Does it just randomly decide when to buy and decide based off of its balance or is there a weighting somewhere about the opportunity cost of spending on one smaller thing instead of saving for a bigger thing?
Bro don’t stop with these type of videos. As soon as Monopoly got into the algorithms I subscribed Immediately only after the video to see that you only had Sophie uploads just yet. Keep up the good work!
Great video! I just watched the full run too :p What do you think would be needed to make an ai for btd2 battles, with the versus aspect and sending balloons?