How to make AI

I don’t know how to make AI. But I want to in Microsoft MakeCode.

6 Likes

What kind of AI, one where they randomly walk around or, like wait for the player to get close. Ect. I can totally help with this.

3 Likes

I made a handy AI Extension for that!
I can also answer any questions if you have any : )

4 Likes

I have 2 ideas for what I want. One AI which does in fact walk around but also shoots enemies and says quips. Another would be one similar to Akinator. My school blocked to use of searching anything up using “AI” so I have no idea how to do it and my Computer Science teacher wont teach me how.

1 Like

How do I use the extension? I’ve tried to use it but I don’t know how to navigate it.

2 Likes

Ah, sorry! You’re looking for enemy AI. That extension is neural network AI, whoops!

1 Like

I have no Idea how you would be able to make Akiniator, (It would probably be very complex.) However I can totally make the projectile-shooting enemy. I made a little demo.

The AI walks around randomly (The skeletons) using a path finding algorithm. When the AI finds the player it will shoot asteroids at them. Sometimes they will even say little quips. Click edit code to open the code up to see my comments and how it’s coded. Don’t worry about the “Namespace user config” at the beginning, it makes the screen bigger for the example.
Her are the extensions involved.

https://github.com/felixtsu/pxt-sight - lets the enemy see you.

https://github.com/jwunderl/arcade-tilemap-a-star - Path finding

https://github.com/jwunderl/arcade-sprite-util - utility

Let me know if this is not what you wanted.

2 Likes

You could do this

1 Like

1 Like