Artificial Intelligence

I am going to try to start programming an artificial intelligence to control our robot’s autonomous period. Has anybody done this before? I think that it is going to be rather difficult (if at all possible), so any help would be greatly appreciated. I wonder if @jpearman has any information that might help. I do think this could lead to some rather interesting conversations. For example:
Other Alliance: “So what does your autonomous do?”
Us: “Whatever it feels like.”

That is pretty much what many novice teams autonomous mode programs do now.

Take a look at this LIDAR system by @tabor473 at VEX U Worlds for Nothing But Net. It sort of has what you want. The system will search for balls using an ultrasonic sensor, move itself to pick up the ball and shoot it into the net. See the post for more information

Ok thanks. I’ll look into it

We thought about making our robot look for large cubes to throw over the fence since we have 8 seconds at the end of the 15 sec to try to throw the opponent’s cube back at them. However, then we realized that our alliance partner was also an large cube…

So true.

It’s certainly possible, but better gains are to be had from simpler techniques. There aren’t a lot of benefits to applying AI techniques to this isse, versus just having code that switches actions based on sensor input. If that’s what you’re planning on doing, it’s a good technique, but it’s not AI.

I agree, even if you were to make a truly autonomous program, it wouldn’t have the same capacity as a normal autonomous program

They are worth 10pts if you throw them over.

Nice.

Let us know what you find.

I recall a certain team’s autonomous that would ‘drive straight and knock stars off the fence’

It ended up turning, and pushing our robot to the perimeter and knocking it over. We were then disabled costing us the match :confused:

If you really want to do full-on AI to control every autonomous movement, I suspect this won’t be possible on the current Cortex. It’s too underpowered for something of this caliber. However, a good place to start would be by looking at WPI’s LIDAR as MayorMonty first linked. You will need a way to gather information from the field, LIDAR is a quick and easy way to do this. You could also figure out some sort of a camera system and run CV. Of course none of this is legal for HS.

Once you have a way to gather information about the state of the field, you need to figure out how to keep track of your robot’s state (position, orientation, etc.). Next, work on having the robot make decisions about how to score.

This definitely isn’t an easy problem to solve. Pay attention after worlds for a reveal from my team, we might have a couple things that will help you out.

Ez win

1 Like

Update: I started with a bunch of different functions, then used a random number generator to pick different functions, and set a random amount of time for each function. Once the run is over, we scored it. Then we put the score into the code and it uses a series of calculations in order to do the best it can. So far, 1 point. It’s getting better though. BTW, the first time I tried running it, I was standing on the field. Don’t do that if you don’t know what the program is going to do. It grabbed my feet and pushed me backwards so I tripped on the middle fence.

I think you should try also using encoders to sense if the robot isn’t moving way before it reaches its object, and then the robot will be able to know there’s an object in front of it, so might as well grab it and give it a throw. But yet again, [ABOVE] can happen maybe if your robot bumps into your alliance.

How are you getting RNG in ROBOTC?

Not quite RobotC code, but close enough:
https://blog.pxtst.com/entropy-on-the-cortex/

Apparently analog ports without anything plugged into them change randomly. Also, you could have a task continuously increment a variable, then read the variable%100 every time you needed a random number.

Edit: Ninja’d

Analog ports with something plugged in also have some fuzziness.

Think of it like what happens when you set a multimeter to the most precise resistance setting and touch the probes together. Unless you have a ridiculously fancy/expensive multimeter, the numbers will probably change a little bit even without you doing anything.

@7447C Twisted Wire

I believe that BNS also used LIDAR to track and shoot balls in nothing but net. It was on their 15" robot in this video.. I saw their team running programming skills and the 15" robot was very good at sensing and scoring the balls. Unfortunately, I saw this in person, and don’t have any videos.

http://help.robotc.net/WebHelpVEX/index.htm#Resources/topics/General_C_Programming/Math.htm?Highlight=rand