Log in

View Full Version : Interest in Programming Competition?


Guest
10-03-2004, 22:59
Is anyone interested in participating in a FIRST-only team programming competition?

See this other thread for info ... http://www.chiefdelphi.com/forums/showthread.php?t=25123

Reply here if you are interested.

Ryan M.
11-03-2004, 05:03
Depends on when it is and the cost of the entry fee (still being disputed over at the other thread, so I don't know what you'll decide). Sounds like fun! :)

Astronouth7303
11-03-2004, 07:32
Is anyone interested in participating in a FIRST-only team programming competition?

See this other thread for info ... http://www.chiefdelphi.com/forums/showthread.php?t=25123

Reply here if you are interested.

Sure, after I finish Autonomous.

How about one for what you run in a bot at a competition?

HuskieRobotics
11-03-2004, 09:07
I would be interested, but like they said I need to know what the entry fee is going to be.

CrashZero
11-03-2004, 09:54
:eek: Well it is nice to know that my team just signs me up for stuff. :eek:

Guest
11-03-2004, 20:50
What do you think is a fair entry fee and prize?

Guest
11-03-2004, 21:00
This is what I would ideally want the competition to look like:

Write an autonomous program that would read in data from virtual sensors and attempt to do a certain thing. The simulator (that is written by the organizers) would feed realistic sensor data to the program. The program would respond by sending signals to the motors.

When everybody's submitted their code, NRG would make the "robots" compete in an online Flash presentation. Like in real competitions, people would be able to modigy and resubmit their code for subsequent matches. If me and the other NRG members can pull this off, I think it would be really cool.

mtrawls
11-03-2004, 21:08
This sounds like a fun thing ... but I'm not too sure about entrance fees and prizes and all. Maybe if it started out as a friendly competition with name recognition and a virtual pat on the back the reward more participation would be obtained. I assume the simulator would be available to teams so they could test their code? (How about the source? Would this be developed independently ... or is community involvement being sought).

Eithe way, all I can say is now is too soon! Far too much going on to give it any serious thought (in school alone ... but also I believe there's some sort of robot competition approaching? ;))

Guest
11-03-2004, 21:12
Point taken well, but if something is to be ready when Nationals are over, I think it would be best to plan ahead.

1. Yes, the simulator would be available to teams ahead of time.
2. Who is writing the simulator? I don't know. Maybe I'll make it a sourceforge project.

And, I think the visual simulator will be a Java/C++ hybrid, not Flash.

OR - the simulator could be a Direct3d application that would download real time data from NRG's server.

Astronouth7303
12-03-2004, 07:30
There's an idea. DirectX covers video, audio, multi-player, and probably some other things. But realtime may be a little excesive (Maybe not- you may just stream position data and sound)

If you go DirectX, can we send virtual models of our bots with an INI describing motor data?

CrashZero
12-03-2004, 14:50
I must say that using DirectX is one of the best ideas i have seen posted on this fourm. Not that i am saying that i would not be interested if you didn't use it cuz i still would be. (Even though my team said i would participate before i even knew about it) I think that this is a very creative way of fundraising and depending on just what the fee is I would be very interested. :D

Guest
12-03-2004, 15:37
There's an idea. DirectX covers video, audio, multi-player, and probably some other things. But realtime may be a little excesive (Maybe not- you may just stream position data and sound)

If you go DirectX, can we send virtual models of our bots with an INI describing motor data?
That is a great idea for motors being describing in an INI. Virtual models would be possible if someone can write a model loader in Visual Basic for DirectX 9.0. I've begun writing the simulator, I'll probably have incremental downloads accessible at the RoboCoder (any ideas for a better name?) site:
http://nrg.chaosnet.org/coder

I would have to precompute each match's results at our computers. Then I would make the simulator download the latest match and play it so that each robot followed the path I precomputed. Then after the match, you could resubmit code to improve. I would then precompute the next match's results, and the cycle continues.

I'm trying to figure out a way to spread the word, how would I go about doing this?

Astronouth7303
12-03-2004, 18:07
If you check MSDN (www.msdn.comn) and search for DirectX, there should be some SDKs on it. I downloaded v7, but I don't claim to understand it. I would recomend starting a thread to create the file standard. (.Bot for data? :))

mtrawls
14-03-2004, 15:12
Write an autonomous program that would read in data from virtual sensors and attempt to do a certain thing. The simulator (that is written by the organizers) would feed realistic sensor data to the program. The program would respond by sending signals to the motors.


That is a great idea for motors being describing in an INI. Virtual models would be possible if someone can write a model loader in Visual Basic for DirectX 9.0.


Hrm... it seems like the project might be getting a bit complicated. I don't know, but is there necessarily a need for fancy graphics, or even to "describe" a motor? I guess it all comes down to what you want the competition to be ... and so I think you need to first say that, so everyone is on the same page. What sort of challenge is it? Are we competing against other "robots" to get somewhere first, or is it solo (either timed or otherwise scored)? Does everyone get the same virtual "robot", or can it be modified (if so, I'd remember to keep the focus on programming). I was under the impression it would suffice to model the robot as either a point or other simple geometric object, and that there wouldn't be a need to display it. Perhaps I'm wrong, but what is the compelling reason to have graphics and other complications? Not that I'm complaining: if you can get it all to work, that would be great ... but I'm just trying to think of how manageable it is to code the base quickly enough with less room for bugs so that the competition is more viable. (And not everyone necessarily has DirectX or even windows ... but that's something else to think about.)

Redhead Jokes
14-03-2004, 17:09
Is anyone interested in participating in a FIRST-only team programming competition?

*intriguing* I'll bet our team would be interested.

Guest
14-03-2004, 18:17
Hrm... it seems like the project might be getting a bit complicated. I don't know, but is there necessarily a need for fancy graphics, or even to "describe" a motor? I guess it all comes down to what you want the competition to be ... and so I think you need to first say that, so everyone is on the same page. What sort of challenge is it? Are we competing against other "robots" to get somewhere first, or is it solo (either timed or otherwise scored)? Does everyone get the same virtual "robot", or can it be modified (if so, I'd remember to keep the focus on programming). I was under the impression it would suffice to model the robot as either a point or other simple geometric object, and that there wouldn't be a need to display it. Perhaps I'm wrong, but what is the compelling reason to have graphics and other complications? Not that I'm complaining: if you can get it all to work, that would be great ... but I'm just trying to think of how manageable it is to code the base quickly enough with less room for bugs so that the competition is more viable. (And not everyone necessarily has DirectX or even windows ... but that's something else to think about.)
The robot would probably be a rotatable/translatable rectangle, not a point, so that you can send signals to multiple motors placed at the corners of the bots. 3d graphics isn't neccessary or even warranted, but would be a cool "plus" if I can finish everything else first. Java will probably be the simulation language of choice. About the competition itself: one robot vs. another.

Astronouth7303
15-03-2004, 07:35
The reason I sugested the INI thing was so that the sim could get feed-back from any pots or whatever you have on the bot. Of course, we would have to check it to make sure you don't have, like, a gear with .5 teeth (REALLY slow, ultra powerful). I would say restrict the motors to kinds in the kit, and in the INI, say which one. I'll create a thread on it.

seanwitte
15-03-2004, 14:39
A system like this already exists, developed using Java by IBM. http://robocode.alphaworks.ibm.com/home/home.html The robots attack each other, but you may be able to use the framework as a starting point.

Guest
15-03-2004, 16:14
I think we should all program with one robot like mtrawls said. You can see my response to this kind of over-complication here:
Focus on the competition

This is the overall structure that I propose:

Everything is written in Java. (If you want to, it may be possible to write in C and link into Java using Native methods, but that's something to be discussed later). A simulator class will calculate the position of the robots and keep track of scores, the game world, etc. Each team submits one Java class that implements a "RobotCode" interface. Interrupts would not be implemented. The simulator would call an "Initialize" method on each Robot. Then, at every "frame", the simulator class would call a "NextFrame" method on each robot so that it could calculate the signal to its motors. The robot can call a GetSensorValue method on the simulator to get sensor values. A summary follows:

|---------| <--- GetSensorValue ------< |----------|
|Simulator| >--- Initialize -------------> |RobotCode|
|---------| >--- NextFrame -----------> |----------|

mtrawls
15-03-2004, 17:18
I'm a C man myself (of the languages I use, Java is not included), so this discussion will concentrate on C/C++ data types and such (I trust it should be easy enough to follow, though, Java or not).

I'll start a discussion of the Robot class, as this is where all the end user action will be, so the most "community" discussion should be concentrated here (as I see it, anyway). The important things for this class will be the private (or public) data and the methods.

The data is mostly sensory input (and other metadata the simulator might need, such as team number). It should be decided, then, what types of sensors will be used, and their range (I assume it would most likely emulate the behaivor of the stuff we use). Maybe an IR sensor -- in which case, this might be an opportunity for simplification. Since the competition isn't designed to test our interrupt-from-scratch skills, just a simple boolean value (see IR or not) would do (or a more complicated value in case there are various beacon types). If you include a gyro, it might be a bit easier so far as the simulator itself is concerned just to give the angle directly, instead of giving rate of turn. Maybe we have some sort of arm that we can extend for some reason, in which case we might have a pot input, which should be straightforward enough. Who knows? The inputs should be controlled by "the creators" of the competition, obviously, so I'll just leave my thoughts as they are here. (I imagine all this will be encapsulated healthfully enough in some Get_xxx methods. Go OOP! ;))

Then we can move to the (other) methods. This is the fun stuff! Things like Move_Robot(x) and Turn_Robot(x) -- or perhaps a bit more indirectly, via Set_Left_Drive(x) and Set_Right_Drive(x). This is where we'd be able to set the motor output to our hypothetical arm, for instance. However you expect us to respond to our inputs will have to be considered here.

Therefore, it would be nice to start with a description of the "robot" we'd all be using ... a base design by "the people in charge" so we all have some baseline to work from, and then some community input based on that. It would be immensely easier to start thinking of the design of the simulator itself once it is figured out just exactly what it has to do -- and hence what the robot is capable of needs to be defined first.

Guest
15-03-2004, 18:06
Therefore, it would be nice to start with a description of the "robot" we'd all be using ... a base design by "the people in charge" so we all have some baseline to work from, and then some community input based on that. It would be immensely easier to start thinking of the design of the simulator itself once it is figured out just exactly what it has to do -- and hence what the robot is capable of needs to be defined first.A description of the robot:
A square base with two tank treads, one on each side (I'm biased).
One motor on left side, one motor on right side.
Motion is "perfect," as in, speed is linear with PWM output.

Sensor collection:
3 Line Sensors (downward facing in "front" center, front left, and front right of robot)
IR sensor in center of robot (you can set the angle that the sensor faces)
3 distance sensors (see picture below)
http://nrg.chaosnet.org/coder/robotpic.bmp

CrashZero
15-03-2004, 19:00
I agree that it would most likely be a good idea to use C/C++ because that is what most of the teams will have used in programming the actual robot but it is not really up to me so...I will say that I would be interested in participating no matter what language you deside to use.

oneyd
15-03-2004, 20:28
There is actually a program from IBM that has the Graphical Interface already made. All you have to do is write the code for the robot in Java, which is very similar to C/C++. check the link in my signature for more info on the program.

oneyd
15-03-2004, 20:30
btw, does anyone know if IBM has posted the source code for robocode?

Astronouth7303
15-03-2004, 21:21
Not bloody likely.

And if I may paraphrase what some one else said:
You lame pig farmer! I'm not talking about a simple little thing that runs this little postage stamp. I'm talking about a full-out, tricked-out, customizable-inside-out, big simulator.

Not to say I wouldn't apresiate the reader code

av11d
15-03-2004, 23:21
This all seems cool I guess, but really complex. I think if you made this competition more open, you'd get a lot more entries when it comes time to run it. Here's a possibility:

Each year, the competition sets up a new 'problem.' For instance, this year, the contest could be on developing a Scouting program. You could enter the contest and attempt at creating a scouting program (obviously, there would be more requirements and guidelines). You could, for instance, require the program to be able to run on windows, but if your app is cross-platform, then you get bonus points. This would allow all entrants to develop their app in whatever language and IDE they chose. Java, C++, ObjC, VB, or whatever.

In this sense you accomplish a number of things:

1) The competition is more than just an algorithm competition. It's a competition on who can build the best overall application. It's important to know all the phases of application development in the real world.

2) The end result is something EVERYONE can benefit from. In this case, I mentioned the scouting application, which could be distributed freely to all FIRST teams.

3) You will get many more entries because the competition is NOT language specific.

4) Each year, you'd gain a new and exciting programming experience. Maybe next year the application could be some type of application that has to do stuff over the internet. And the next year something to do with graphics programming (match simulator?).

Any thoughts? Best of luck!

oneyd
16-03-2004, 13:08
Whatever sort of compitition you want to have, if you want to be able to watch whats happening, it will most likely need to be done in Java. Java is pretty much C/C++ with graphical capacities, so it's the closest language with graphics to the robot code. but thats just my two cents.

mtrawls
16-03-2004, 18:17
You lame pig farmer! I'm not talking about a simple little thing that runs this little postage stamp. I'm talking about a full-out, tricked-out, customizable-inside-out, big simulator.

I must say I'm a bit confused as to the reference to pig farmers ... but, notwithstanding that, what exaxtly is the purpose of a "full-out, tricked-out, customizable-inside-out, big simulator"? So far as a simple programming competition, it is overkill.


Whatever sort of compitition you want to have, if you want to be able to watch whats happening, it will most likely need to be done in Java. Java is pretty much C/C++ with graphical capacities, so it's the closest language with graphics to the robot code. but thats just my two cents.

Java is C/C++ with graphical capacities? Do you mean to imply that C/C++ do not have graphical capacities? That would suprise some people! (http://crystal.sourceforge.net/)


The competition is more than just an algorithm competition. It's a competition on who can build the best overall application. It's important to know all the phases of application development in the real world.

Well I guess it all goes back to what is the point of the competition. It seems it is intended to be "just an algorith competition" -- something simple, quick and fun. Sure, it would be neat to build a complex application capable of all sorts of fanciful things ... but you have to think about the practicability of it all! Those sorts of things take many many man hours, multiple programmers and consist largely of debugging -- meanwhile, you'd have to compete with time for school, work, FIRST, etc. The point of a simple "just an algorithm" contest is just that -- it is simple. It can be done quickly, be fun and still educational. Programming a full scale application and getting it ready to distribute to teams like you suggest is tantamount to taking on a software engineer's job full time!

Now granted I haven't done a lot of programming on major projects; but I have done a little bit of it all by my lonesome on some smaller scale, but still complex projects, and like to think that I have some sort of idea about what I am talking about. It seems like you don't realize the amount of time, frustration, etc. that has to go into something like this ... and you have to decide if it is worth it, i.e., what you'll get from it. And it may very well be a lot ... but I think a lot of people here would have trouble finding time for it all while being in FIRST, school, job, etc.

As a challenge to those who suggest these complex features, and to get everyone thinking on what exactly is required for such an application ... come up with a fairly detailed framework (no coding required) for the system you'd like.

Astronouth7303
16-03-2004, 19:22
I must say I'm a bit confused as to the reference to pig farmers ... but, notwithstanding that, what exaxtly is the purpose of a "full-out, tricked-out, customizable-inside-out, big simulator"? So far as a simple programming competition, it is overkill.

It was a spotlight for a while. Check here specifically.

Java is C/C++ with graphical capacities? Do you mean to imply that C/C++ do not have graphical capacities? That would suprise some people! (http://crystal.sourceforge.net/)

No kidding. It's just that graphics aren't as native to C++ as they are to Java. It was made back in dos days.

Well I guess it all goes back to what is the point of the competition. It seems it is intended to be "just an algorith competition" -- something simple, quick and fun. Sure, it would be neat to build a complex application capable of all sorts of fanciful things ... but you have to think about the practicability of it all! Those sorts of things take many many man hours, multiple programmers and consist largely of debugging -- meanwhile, you'd have to compete with time for school, work, FIRST, etc. The point of a simple "just an algorithm" contest is just that -- it is simple. It can be done quickly, be fun and still educational. Programming a full scale application and getting it ready to distribute to teams like you suggest is tantamount to taking on a software engineer's job full time!

EXACTLY! That's the point!
Ok, not quite. but part of it is that urge to cram all the fetures you can.

Now granted I haven't done a lot of programming on major projects; but I have done a little bit of it all by my lonesome on some smaller scale, but still complex projects, and like to think that I have some sort of idea about what I am talking about. It seems like you don't realize the amount of time, frustration, etc. that has to go into something like this ... and you have to decide if it is worth it, i.e., what you'll get from it. And it may very well be a lot ... but I think a lot of people here would have trouble finding time for it all while being in FIRST, school, job, etc.

That's why I haven't tried on my own. Under author, it will have "ChiefDelphi Community".

As a challenge to those who suggest these complex features, and to get everyone thinking on what exactly is required for such an application ... come up with a fairly detailed framework (no coding required) for the system you'd like.

Again, check the thread above. I want some feedback on the idea so far before a make a big list of classes, methods, purposes, etc.

Guest
16-03-2004, 20:40
OK, hold everything!!!

It seems we have divided into two seperate factions. One that is focusing on the programming of the simulator and one that is focused on the competition. Since before I came up with and posted the idea for this type of competition, I have been developing a simple framework to allow two virtual robots to play some sort of a match using autonomous code. Astronouth7303 wants to create a complex simulator. Now this has very useful (and fun!) attributes, but I do not think that it will be as useful in a autonomous programming competition.

Since (I think) I came up with the idea (see this thread, and another thread)for the competition, I am going to take lead and continue writing some Java classes for the competition. If Astronouth wants to write a simulator, then that's great - but I think it should be seperate from the NRG RoboCoder competition, which is currently focused soley on autonomous programming.

EDIT:
And .... RoboCoder source and documentation v0.01 is public. (It does not include the simulator.)
http://nrg.chaosnet.org/coder/src/docs/ - JavaDoc documentation for the RoboCoder SDK
http://nrg.chaosnet.org/coder/src/ - Source files (indiv. files, not Zip)

av11d
16-03-2004, 22:59
Since (I think) I came up with the idea (see this thread, and another thread)for the competition, I am going to take lead and continue writing some Java classes for the competition.

Actually: http://www.chiefdelphi.com/forums/showthread.php?t=21351&highlight=programming+competition

Granted, you are the first person to actually do anything about it. It seems like a good idea and all but I really have my doubts.

1) Writing an autonomous simulator framework seems rather complicated

2) Everyone is already writing their autonomous for the REAL robot, why would they want to develop a second autonomous program?

3) Everyone seems to program in different languages. A lot of the older members program in C/C++ because that's what was taught at their high school. However, the Programming AP exam this year changed to java. So now all the younger members program in java. And then there will be the people who hate both :)

4) You have no corporate sponsor. All the current award competitions have big sponsors. This allows for judging by professionals and assistance by professionals. It's much cooler to have your work reviewed by Ted Boardman than team number whatever from down the street. Not to mention cool prizes in cases such as the autodesk awards.

5) Interest? I only see a handful of people actually interested in this by browsing through the forums. And 3/4 of those people are the ones that want to run on it. Most teams have only one programmer, so you guys are going to need to market yourselves heavily.

Best of luck. You've at least started working something, which is more than anyone has ever done :)

Astronouth7303
17-03-2004, 07:30
Ok, I'll excuse myself from this thread. If you want to know why we should make such a thing, check the other thread. I know it will be hard, It will probably take a while, but we can do it.

And I think that your idea is a great starting pont, but it's hard to exhibit a great program without hardware to go with.

Guest
17-03-2004, 18:25
3) Everyone seems to program in different languages. A lot of the older members program in C/C++ because that's what was taught at their high school. However, the Programming AP exam this year changed to java. So now all the younger members program in java. And then there will be the people who hate both :)
Actually, even though I'm writing the framework in Java, competitors can still write their code in C++ using something called JNI - Java Native Interface. This allows my Java code to talk using OOP with C++ programs. Although I am proficient in C/C++ and Java, I do not know much about JNI, so if you want to write C++ code for the competition, do some research on JNI at http://java.sun.com/ . For the people who hate both - learn a "real" language, j/k.

Ryan M.
17-03-2004, 18:50
I had never heared of JNI. I'll have to check it out. Great job organizing this! :)

Guest
17-03-2004, 23:15
v0.02 of the SDK had been released:

http://nrg.chaosnet.org/coder/src

You can now download it in Zip format! The Zip format download PHP script is not working. Just use this link http://nrg.chaosnet.org/coder/src/docs

If someone would examine the Simulation and Sensor sub-class documentation and tell me if they want more sensors, that would be great! If there's anything else needs to be added, tell me! I'm only working on the structure, not the implementation.

Ryan M.
18-03-2004, 10:47
Will the line/IR sensors return an analog value? Looks good.

oneyd
18-03-2004, 20:41
will this competition include the platforms. And if so, can you include tilt sensors in the functions. they could just return a boolean with true being tilted and false being level. Great job on the code.

Guest
18-03-2004, 23:15
Will the line/IR sensors return an analog value? Looks good.
Line sensors, neither do IR sensors don't need to be analog.

Distance sensors do need to be analog, and they are. By default all sensors can return "int" values.

The SetSetting methods on the sensor allows you to customize the sensor like in real life.

As in:
LineSensor - setting is 0 for on when bright, or 1 for on when dark
IRSensor - setting is the 0 to 255 (mapping to 0 to 360 degrees) angle that the sensor faces (like a servo that rotates the sensor)