Artificial Intelligence in Hopscotch

A feature I’d like to see in Hopscotch is: A basic form of artificial intelligence

I’d use it for this type of project: Projects where it would be fun to have an AI to mess around with, such as “walking”- see example project

Here are some examples of Hopscotch code that could be improved if we had this: We could have easier AIs for games that we want to make

Here is an example design I’ve made:

An example, edited image from a linked example project

Walking kinda thing by _Alboy_ Coding

In this, I have an AI “walking” back and forth- it tilts the way it’s moving, and if its angle is more than 45, it “falls over” and resets.

The “Tell AI: bad” block, would “punish” the AI, kinda using reward modeling. There would also be an option to tell it if it was good, to give a reward.

If the AI is told that it was bad when it reaches 45 degrees, it would automatically try to correct that. I imagine it as it realizing that it gets close to 45 degrees(after it realizing that 45 degrees is a bad point, from multiple tests ending when it goes over 45- this is probably the main artificial intelligence part) it uses a turn block to move away from that scary 45 degree mark that it gets punished for going over. Another way that it would be intelligent would be it recognizing what is happening that it wants to not do(or do again if it gets told that it was good, instead of bad) and and using the appropriate blocks to stop it.

I’ve seen something similar in another programming languages, it looks like this: Basically a lot of things now, the most well known is probably ChatGPT. It’s just knowing what’s happening and how to change it to get rewards and not punishments.

AI would be a really cool addition to Hopscotch- even if you add it to the advanced mode only. It would be annoying if it was adv mode only though because I don’t have it, but that gives me more reason to get it, and I’m sure other people would want to get advanced mode and play with AI.

@Alpeople

6 Likes

wouldn’t that be something you’d code instead of being built into hopscotch?

8 Likes

Not exactly, because it would automatically know when to do it without you telling it to- for me checking all the time if the angle is 44 or something is too cemented, and I would like to have things less like that, and more imaginative.

Just AI is fun for me lol and I would like to see it in HS

4 Likes

Slayy i would love to see that too

3 Likes

would be too buggy and weird, also mostly weird to implement

2 Likes

But it would be fun to use, and with enough time and focused work on it THT could make it work well, and it would be good

2 Likes

I agree, I recently tried to make a Rock Paper Scissors AI, but uh, it’s just basically random, not learning.
It would be very cool to play around with too.
But Idk how difficult or expensive it would be to add.

2 Likes

that could be possible but with the way the app development is going right now im not sure

2 Likes

idk if this could be possible but it’s a very cool idea!

3 Likes

imo that’s part of coding a game

3 Likes

Yeah but i feel like its too hardcoded, and i would like it to be more free idk

3 Likes