I usually use them as a condition! So āif output >0.5 then press buttonā. Not sure about the letters, as it should only give out numbers 0-1!
Thanks!
help
i have no idea what Iām doing. Iām trying to get the net to run away from a sprite. its not working one bit.
hideous code warning ![]()
Actually this works fine in principle, just a few bugs:
-
- You mixed up mysprite and mysprite2 quite a bit, I made it so the dog is always the one running but I realize maybe the meat was supposed to be running XD You could switch the images around anyway!
-
- You were using the distance between the sprites as an input between 0-1 by dividing by 100, but because the meat is only following at speed 10, the dog can get more than 100 pixels away- I fixed it so the sprites are in a 10*8 tilemap with walls around the edges so the maximum distance is always 160, so dividing by that ensures the input never goes over 100!
-
- I also changed the wya you assign velocities. In the original a value of 0.5-1 would get a speed of 50 - 100, but a value less than 0.5 would get a speed of 0 - -50. (This subsequently discludes values 0-50 and encourages fast positive velocities more.) Instead, I subtract 0.5 from the output first to limit the speeds to 0-50 and 0 - -50 respectively!
-
- This is something iām fixing with the update- the base ārandom netā function in my original extension is far too overpowered and usually outputs way higher than average. I added a āmix with empty netā block to just push all of the weights closer to 0, so there is more variability at the start!
-
- Another error with my extension- it has dramatic pause a BIAS!!! Yeah, because the weights inside the net can ONLY range from 0-1, the neural net has a huge bias to output higher for higher inputs and lower for lower inputs (even though you want the opposite in this case.) In my much-needed update, ALL inputs, weights, biases, and outputs will be range from -1 to 1 to allow for negative relationships.
-
- This isnāt really an error, but because the dog can only āseeā the distance because it only has that as an input, it can never tell from which direction the meat is coming from. If you tried to evolve this AI, it would probably learn to just sprint as fast as possible in any direction! I suggest a separate input for ārelative x valueā and ārelative y valueā. āmysprite x - mysprite y / 160ā and āmysprite y - mysprite2 y / 128ā. would get these numbers, but they would be limited to -1 to 1, so you should also divide both by 2 and add 0.5 to limit them to 0 to 1.
TL:DR: Flaws with my extension mixed with some variable mixups and incorrect limits on distance and speed!
Sorry to make learning this extension so hard, I hope to seriously improve it in the update, and I really love that youāre dedicated to trying this out and being one of my first students : D
And for anyone dedicated enough to read this whole post⦠the estimated release date is tentatively sometime in October! Usually, Iād coincide it with a new 5-minute polished video, but by not making one I can actually focus more on the update and making a shorter video thatās just a tutorial on how to use it.
With my fixes:
- IāM HYPED!!
- I plan on using the new extension

- IDK, sounds complicatedā¦
- Buttons!
@randomuser can you help me with this reel quickā¦
I need to have the AI be able to learn over time.
It would be helpful for you to start it because i dont really understand it.
I read the stuff but it didnt make sense.
Please add coments in the project so I can read them when Im editing the game.
Ai fails to move
I can help after CK4 ends! (the 30th)
no dip, I said i need help
Going to be late on that October deadline, but Iāve got some great improvements cooking!
LET
THEM
COOK
(It says in your bio any pronoun)
hey, could you help me figure out how to use this? I get how it works, built I donāt know how to translate that into actual code.
Ah definitely!
Itās quite complicated at the moment, I need to update it to be easier to use XD
What are you trying to do?
I am also interested in neural nets. Donāt think I am smart enough (yet) to understand it. ![]()
Maybe have a easy to understand incredibly simple example?
In school we are doing an essay on ai this is a great way to show it good job btw
Thatās a good idea, maybe in demo form so it can be easily modified⦠Iāll get on that! ![]()
I am mainly trying to figure out how to make some Ai characters move around based on where a ball is and other AIs are, but basically its AI Soccer. hereās an example of what I am trying to do with the follow function instead of the AI.
I always wanted to make FIFA in makecodeā¦when i was a kid i was so closeā¦so closeā¦
@randomuser Whatās the link, the link does not seem to be working for me.
i made this with the demo since idk how to use the extension
They changed their username so just paste the link into a regular search engine and itāll redirect to the new url which you can paste into makecode