Slashdot Mirror


Learning Java Through Violence

Joe writes: "Someone introduced me to a new game called Robocode and now I'm hooked as well as my 17 year old son. We are both learning Java while playing the game or I should say while building our Java robots. The game is setup to teach you how to handle events, how to create inner classes, and other Java techniques to build more sophisticated Java bots. I have a c++ background so I've been helping my son with his bots, but he's catching on very fast. It's turning out to be a cool and easy way to get the kid clued into programming and best of all its free." I'll bet if the little Logo turtles shot at each other, I would have had more fun programming as a kid.

20 of 225 comments (clear)

  1. Hmmmm. by dr_dank · · Score: 3, Funny

    Now if we could only have Quake III teach reading, we'd be good to go.

    --
    Where does the school board find them and why do they keep sending them to ME?
  2. This is how i learned C, too by Smallest · · Score: 3, Redundant

    There was a thing just like this for Amigas in the late 80's that used a crippled version of C for the bots. You could use "radar", shoot things, move, etc.. a lot of fun - and a good way to learn C.

    And, before that, i actually wrote my own version of a programmable bot game for C64, using a homemade 'machine' language. no slick graphics here - you watched the memory space (each bit in the arena's memory space lit up as a single pixel on the 340x280 screen).

    All of this based on a Scientific American article about a phenomenon called "Core Wars".

    -c

    --
    I have discovered a truly remarkable proof which this margin is too small to contain.
    1. Re:This is how i learned C, too by cnkeller · · Score: 3, Insightful
      Was I the only one who went to a college with this type of game? Net trek was fun and all, but even the most relentless ogger needs a break. A friend of mine created a robot wars game in the late 80's for a project in compiler design. You wrote C code; moving the robot, firing patterns, etc. The game had 2d graphics, etc. It was pretty cool actually. If I recall correctly the game engine could handle up to 8 different robots. I wonder what other schools used their Connection Machine for....

      A good way for each person to tout his programming skills. The project was updated over the years by each new class of ACM members. Kind of like a university of maryland cult legacy thing in the com sci department. Anyway, I was under the impression that pretty much every school had their own version of robot wars. I know at one point, U Texas had a world wide robot wars gaming contest based on similar concepts. This was about 18 months or so before lego bots got popular. They truely cunning would like at the compiler code and figure out how many instructions were executed per time unit and craft state machines accordingly.

      --

      there are no stupid questions, but there are a lot of inquisitive idiots

    2. Re:This is how i learned C, too by maxxon · · Score: 3, Informative

      Yes, this game was called Crobots. You can still find copies of it around with some well-placed Web searches.

      There's also a more recent type of this simulation called RealTimeBattle which uses a simple text-based protocol so that you can write a bot in literally any language.

      --
      max
  3. I play that game every time I run Java apps by Anonymous Coward · · Score: 3, Funny

    Kill all the other tasks as quickly and accurately as possible before your computer crashes.

  4. Yes, there are others by interiot · · Score: 5, Informative

    Yes, robocode is not the first, see DMOZ's entry. Corewars was perhaps the most famous. Okay, now we can move on to talking about Robocode's merits instead of talking about its family tree.

  5. You have got to be kidding . . . by Wire+Tap · · Score: 3, Insightful
    First of all, take a look at the alternatives to "learning through violence."

    1) Barney. Or, as I like to call it "unlearning through sensory numbing." Obviously not a good choice for anyone, at all, period.

    2)Not learning, although still through violence. Example: most pointless video games. I say most, because I am still a firm believer in the idea that viedo games are great for the imagination, among other things.

    This leaves us with the healthy alternative of:

    C)Learning through violence! Yes, blowing up giant robots is FUN, and most kids would be thrilled to pull the trigger and show off his or her prowess on the virtual battlefield. I know I would love to destroy a an opposing process or script with the knack of my own creation. What is the big problem, when the kid would more than likely spend his or her time on a (possibly) less productice game? I say that this is a great idea. People learn better when they are having fun with what they are doing.

    Finally, it is not "rewarding" the child for following through with a violent act - it is simply a mode by which the student can learn a new skill. Haven't you ever built an erector set? Most of them involved the construction of battlefield tanks or other war machines. It just happens to be one of the best-suited applications for teaching programming.

    --

    Man is born free; and everywhere he is in chains.

  6. Re:Moral implications... by tlianza1 · · Score: 3, Insightful
    The violence is completely unnecessary, and can warp an impressionable young mind.
    The kid is seventeen. He most likely has a driver's license by now. The violence is not completely unnecessary, as it is not uncommon for teenagers (even those younger than himself) to love action movies or other films and TV shows with violence. I'm sure a lot of us did when we were that age and turned out AOK. In this case the subject matter may be precisely what makes the game more fun and entertaining. Create a game about puppy dogs and ice cream and see how many teenagers are interested enough to pick it up and learn a new programming language...
  7. Computers in education wasRe:Moral implications... by firewort · · Score: 4, Insightful

    When I was in 3rd and 4th grades, way back, we had Apple ][ and IBM PC Machines, and we were taught BASIC, and LOGO, both turtle and mathematic instructions. We had district-wide competitions. Computing was for more than teaching productivity software and reader rabbit-crap.

    This is something that has been lost from the curriculum, and should be regained.

    Joe's son is 17, and while still developing, I'd venture that any associations he's made with violence and good were made long before he reached this age. Give the kid and parent some credit, the kid is an adolescent and hasn't rejected hanging out with his Dad- they must be doing something right!

    --

  8. Another idea.. by dwlemon · · Score: 3, Interesting

    Has this been done?

    What about a programming puzzle game? You'd get a task and some constraints and have to write a program that meets the requirements.

    from "Output the alphabet without using any character literals." to.. something more complicated. permutations of a string?

    It'd just have to parse the source file to see if they followed the rules, see if it compiles (warnings not allowed!), and then run the program with whatever input it needs, and parse the output.

  9. What about the other way around? by Grelli · · Score: 3, Funny

    There are those that will tell you it works exactly opposite this.

    You Learn Violence through trying to program in Java!

  10. interview with the developer by n3m6 · · Score: 5, Informative

    kuro5hin has a much more in depth look at robowars .

  11. Re:Moral implications... by osgeek · · Score: 3, Insightful

    Well, I'm sure if little boys were interested in programming pink unicorns to run around kissing daisies in meadows, then a wonderful teaching tool could be constructed around that very concept. As it is, though, a "battle" provides a setting that motivates young boys to get into the educational activity enough to make it worthwhile.

    Besides, having grown up in a house where my parents didn't really censor my cable access, I find it hard to believe that shielding kids from all possible influences really makes a difference. I never got into fights in highschool or college, despite watching Rocky I - V. I've always felt that an intellectual approach to conflict is far better than a violent one.

    How could that be, when I watched The Exorcist and Jaws before I was even a teenager! Why, I even used to watch The Roadrunner back when old Wile E Coyote used to actually hit the ground!

    The key to raising your kids to avoid exerting violent behavior isn't to shield them from all possible observations of it. It isn't even that helpful to have them avoid board and video games where violence is a goal.

    The key is to teach your kids the difference between fantasy and reality. "Yeah, it's fine to go watch a Jackie Chan movie, but when you leave the theatre, don't kick your friends and pretend that you're in a karate fight." "Play Quake and Duke Nuke'em, but remember that they're just video games."

    Additionally, build loving trusting relationships with your children and encourage them to build similar relationships with others. Teach them how to think their ways through problems, rather than giving up and reacting violently.

  12. Re:Moral implications... by Reality+Master+101 · · Score: 3, Interesting

    I'll tell you what there is enough of though, self-righteous pricks who think they should be the thought police, and that they have the magical rules as to how everybody should raise their own children.

    While I disagree with the poster's hand-wringing about violence, I have to defend his right to judge others. The biggest problem with society today is not sex, violence, the DMCA or any of that: It's the "who am I to judge" crap. It's everyone's responsibility to judge EVERYTHING and EVERYONE in society, but be willing and prepared to be judged by others.

    Notice that the poster was not calling for laws to be passed, but it is his absolute right and responsibility to judge on a personal basis what he feels is right and wrong. When enough people feel the same way, society can be transformed.

    RM101: Self righteous, and proud of it.

    --
    Sometimes it's best to just let stupid people be stupid.
  13. Violence doesn't cause all evil in the world. by sheetsda · · Score: 3

    OK, I think this "violence is bad" argument is being taken way beyond a sane or healthy level here. You call this game violent? Did you ever play Tank for Atari as a kid? This is game a remake of that game with modifiable AI and better graphics. You aren't looking at horrific scenes of brutal warfare; you see these small robots shooting little pellets at one another with a decreasing counter above them. Hardly what I would consider violent. Suppose kids were not exposed what you consider violence. How would they deal with the real world? They couldn't, they'd probably go crazy and we'd be worse off than we are now. I don't know about you, but I was technically a kid when I played Wolfenstein 3d, Spear of Destiny, Doom, Doom2, and Quake. You fail to reallise the premise of these games, they clearly state that you have two options: kill, or be killed, they do not present you with the peaceful resolution option because it is assumed to have failed. A situation we would hope never to put into but one we as a species are innately curious about. I also don't feel these games had any negative affect on me whatsoever, in fact, they gave my life direction: they inspired me to study Computer Science, and I'm sure there are millions, if not billions, of kids playing violent games every day. How many are cold-hearted killers? Very few. Due to the fact that Joe appears to be a good parent (helping his son pick up some skills that will be very handy later in life), his son is almost a zero risk for causing another Columbine. This debate against violence has been taken beyond reason. It has become more of a witch-hunt.

  14. C++Robots by mgarraha · · Score: 3, Interesting

    Ever since I read about the play-by-email C++Robots I wondered where I could find the original concept. Thanks!

  15. Disussion groups, theory and more sample bots by cvanaver · · Score: 4, Informative

    Can be found at: http://www.robocode.net/

  16. MindRover by OverCode@work · · Score: 5, Insightful

    http://www.cognitoy.com

    And, of course, Loki ported it to Linux.

    It's an incredibly addictive robot battle game. You generally build robots with a GUI interface, but for serious hackers there is an object oriented definition language called Ice that compiles into the same VM code as the GUI builder.

    -John

  17. Such a thing exists. by khaladan · · Score: 3, Informative

    It's called TopCoder, located at www.topcoder.com (use my name khaladan as referrer if you sign up). You can participate in a contest usually once or twice a week with 7 other programmers trying to solve various problems of increasing difficulty.

    It's based on time. Whoever submits code the fastest, gets the most points. Of course, then there's a challenge round where you inspect other people's code for bugs, and if you find one, supply input that will produce bad output (or crasht the program).

    It's a greate contest. Currently you can choose either Java or C++ to program solutions in.

    Plus, if you get 1st, 2nd, or 3rd place in your room (of max 8 people), you get $150, $75, or $25 dollars, respecitively. I myself have not been playing very long but I got 2nd place once, and sure enough, a check came about two weeks later for $75.

    So, sign up and try it... use my name, khaladan, as the person who referred you.

  18. There are (N+1) of these games by plastik55 · · Score: 4, Insightful
    There are a number of these kinds of games. Other people have mentioned Crobots, Jrobots, and a dozen others I've never heard of. One of my favorites was RoboWar for the Mac, because it used a very small stack-based language, designed in such a way that the processor speed of the robot was limited. Each robot could execute only a limited number of operations per time step, which meant that efficient implementation of your algorithm was the biggest factor in how well your robot did. The author of the game also held annual tournaments that aspiring RoboWarriors could submit their entries to, and see how they fared against the state of the art. That meant that the robots, even with very limited computational capacity, had a very rapid evolution toward very sophisticated algorithms. Early robots just roved around and fired whenever they saw something in their sights. As time went on, the entries seen in the tournaments were able to camp in corners, dodge incoming fire, "lead" their targets, and employ inter-robot communication for team battles.


    Learning throgh RoboWar to produce advanced behaviour out of a slow and limited language was a great help when I later went on to dabble in embedded systems--the skill set required is very similar.

    --

    I have a positive modifier on Troll. When I mod someone Troll their karma should go UP!