This is a tank project with AI that may prove useful.
HOW TO MAKE A COMPUTER PROGRAM FROM SCRATCH CODE
Once you have a good idea of what you would do, it is much easier to code the computer to do something similar. Figuring out what you would do and why is the key to building a good AI. The goal of AI is to create a “computer player” that is indistinguishable from a human player. Tracking your path, or a small amount of random direction can help to avoid deadlock, but get the basics working before you try to tackle deadlocks. The biggest problem with this AI is getting in to a loop where the AI gets stuck. You can also use your feeler to detect the edge of a barricade so you can turn back on course when you get around the edge. This helps if you are chasing a moving target and keeps you from moving too far off course when you change directions to get around a barricade. I like to periodically reset the movement AI to point back at the target and restart the chase algorithm. If you code this in a “More Block” you can disable screen refresh while you switch costumes and your user will not see the alternate costume with the feelers. Switch the costume back to the original and continue moving. If you want to get into the programming world, you must start with some programming. To start with any concept, you must build knowledge about the basics.
HOW TO MAKE A COMPUTER PROGRAM FROM SCRATCH HOW TO
You can use an alternate costume to detect whether the wall you hit is in front or on the side by placing different colored feelers to the front and sides, this can help you determine whether you need to turn right or left. How To Learn Programming From Scratch Develop Basic Programming Skills. As far as moving toward a target (a target can be an enemy tank or a power up selected by your AI) point in direction of the target and move until you hit a wall. You can design multiple AIs that are more or less capable (easy to hard)…etc. For example, the computer does not go after ammo power ups, it automatically gains x amount of bullets every x seconds until it reaches the max capacity….or it has unlimited ammo…. When do you chase down your opponent or fire your guns? Sometimes developers change the rules for computers to make the AI easier.
![how to make a computer program from scratch how to make a computer program from scratch](https://i.ytimg.com/vi/Wccu5XzMoA0/hqdefault.jpg)
You will need to code this same logic in to your AI. For example, when would you go after an ammo power up? a life power up? etc. In order to build an AI, start by writing down what you would do and why.