Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Interest in Programming Competition? (http://www.chiefdelphi.com/forums/showthread.php?t=26640)

Guest 14-03-2004 18:17

Re: Interest in Programming Competition?
 
Quote:

Originally Posted by mtrawls
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

Re: Interest in Programming Competition?
 
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

Re: Interest in Programming Competition?
 
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

Re: Interest in Programming Competition?
 
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

Re: Interest in Programming Competition?
 
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

Re: Interest in Programming Competition?
 
Quote:

Originally Posted by mtrawls
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)

CrashZero 15-03-2004 19:00

Re: Interest in Programming Competition?
 
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

Re: Interest in Programming Competition?
 
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

Re: Interest in Programming Competition?
 
btw, does anyone know if IBM has posted the source code for robocode?

Astronouth7303 15-03-2004 21:21

Re: Interest in Programming Competition?
 
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.

[edit]Not to say I wouldn't apresiate the reader code[/edit]

av11d 15-03-2004 23:21

Re: Interest in Programming Competition?
 
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

Re: Interest in Programming Competition?
 
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

Re: Interest in Programming Competition?
 
Quote:

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.

Quote:

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!

Quote:

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

Re: Interest in Programming Competition?
 
Quote:

Originally Posted by mtrawls
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.

Quote:

Originally Posted by mtrawls
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!

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.

Quote:

Originally Posted by mtrawls
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.

Quote:

Originally Posted by mtrawls
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".

Quote:

Originally Posted by mtrawls
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

Re: Interest in Programming Competition?
 
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)


All times are GMT -5. The time now is 14:34.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi