Complex AI/Bot

Hi, I’m just curious on how I could make a AI or bot work in a datapack. I just want to know this before I contiune on my current datapack because this project is my biggest and I just need to know what I could put in and what are the limits.

So for example, I want a bot that can PvP relatively well with another player. You can’t add skins or anything so I’d make a armour stand and make it my target entity for all my commands. I’ll put some block displays with changed textures over it to make it look like a player and I then make the animations for the bot/AI. So then in theory, I could make it hit the player and if the player’s hitbox is detected outside of the imaginary crosshair of the bot, it would not hit. Then I could make the bot move around and use /random to make it have human errors and all that stuff.

So my point is, if given enough time, could you make a bot perform like a player or would there be limitations like lag or glitchy things or even not possible?

Sorry for my poor english if you didn’t understand something you can ask me I can respond. Thanks

Continue to help post