Use turbo mode. (Shift click green flag) tries is how many times it attempted to beat its own record. Challenge: Post a remix of this project and try to improve upon the adjustment algorithm. Rules: You may only change the adjustment algorithm. If I see anything else changed, even the colors of the arm, you will be disqualified. How to win: get the best success to failure average. I will open the remix and run the project to find this ratio. Whoever wins will get a free script of any kind. (there are limits to the prize that will be determined by me) fails is how many times it failed to beat its own record successes is how many times it beat its own record The trials lists store the tries, fails, and successes for each iteration. Data is the average of the tries, fails, and successes. These are all used to show how good the algorithm is compared to another algorithm. This is for my purpose, so I can improve my algorithm.
How it works: The goal for the arm is to touch a black dot on the screen. On the first run, it adds random numbers to the list "currentInstructions", which tells it to move an arm left or right. Key: 1=move the red arm clockwise 2=move the red arm counterclockwise 3=move the green arm clockwise 4=move the green arm counterclockwise 5=move the blue arm clockwise 6=move the blue arm counterclockwise The code is followed sequentially, so if the list is 1,4,2,5 it will move the red arm clockwise, then the green arm counterclockwise, the red arm counterclockwise, etc. Once it reaches its goal of touching the black dot, it will store the list to "bestInstructions". This list is used to store the shortest list of instructions. Now that it as run for the first time, the instructions will be adjusted using some kind of adjustment algorithm. This algorithm is subject to change in the future, so I won't explain it. All that matters is that it randomly changes each item of currentInstructions by a small amount. When it is done adjusting, it runs the commands on the list until either the goal is met, or it reaches the end of the instructions. If the arm touches the black dot before it reaches the end of the list, it deletes the rest of the list and decides whether it beat its record If the arm reaches the end before it touches the dot, it will copy the best instructions back to current, and adjust it again. v1: basic algorithm. v2: data collection to see how much better an algorithm is than the last one v3: 3 buttons to hide lists and variables v4: attempts at different algorithms. changed trial count for more accurate averages.