Neural networks/Machine Learning in Hopscotch?


#22

Lol yep I did and the first way of implementing stuff like that is Linear regression that basically takes data points and calculated what would happen next accoring to the input data with X as input and Y as output, and if you re-evaluate the line of regression every time you get new data, theoretically it should get better every time.
@Hopscotcher
@ThatEnglishMuffin


#23

I see. That makes sense. For every extra point added to the graph, a more detailed line can be generated. Speaking of these things, in my soccer project I did a simple check if else command for the character moment, where it would check the positioning of the ball compared to its self positioning to move. (You can find this in any of the red or blue circles.)


#24

Almost… That is just A.I. the difference between a neural network and A.I… A.i. is basically just an if statement, a neural network changes the if statement to make itself better


#25

These neural networks have been made before, like that stick game that was featured, as it was used to calculate the number of sticks needed to remove for it to win. (even tho you can pull the same trick 5 times and it won’t notice. (A.I still is pretty bad some times. (Maybe that’s a good thing. (I think it’s a good thing))))


#26

Yeah. I should’ve been more clear. I wasn’t referring to it as a neural network, but an example of AI.


#27

Perhaps a AI network that learns your patterns and tries to compensate by picking, say 1-4, and trying to guess which one you choose?


#28

If you were to do a neural network with the stick game, it would start out with just pick random sticks. Eventually it would put more “weight” on the pattern that works, then pick that number more times.


#29

Because the AI has to compensate for the first few random “sticks, as it could be any different “stick” pulled that could change the patter needed to win.


#30

What do you mean?


#31

Say there are 10 balls. The AI has to figure out how to not pull the last ball. You start, and must pull 1-3 balls. The AI must then figure out how many balls it needs to pull on its turn for the highest chance of success. Does that make sense?


#32

Yes exactly! Just it will take time to get there


#33

Yeah, as there would need to be (in my opinion) at least three variables to calculate a good answer.


#34

What do you mean by at least three? Because the input would be how much the human takes, then the network would guess what they should do as compared to data it has collected. I have a really simple neural network project I did in c#. It plays tic tac toe. What it does is sesrches a database for a situation close the the one it is in right now, then it goes the next move to win or to tie in that order.


#35

Yea, that was what I was trying to describe! That’s exactly what I meant.what I meant on that other part is that three variables are needed to accurately track a pattern. That part was a tad off topic.


#36

Ah ok that makes more sense. Did you check out the linear regression equation link I have about it?


#37

Yes I did.


#38

Cool. Do you have any ideas on what to use a neural network in hopscotch?


#39

I don’t yet, but I have been thinking about it, I was thinking about an AI game where you can use a attacking against the AI, and they can choose to attack or defend, so basically it learns your patterns to decide if it should attack or defend to win.


#40

Ya that would work. It would be code heavy and probably feature worthy


#41

I bet. The code though, that would be insane.