This course has already ended.

Luet oppimateriaalin englanninkielistä versiota. Mainitsit kuitenkin taustakyselyssä osaavasi suomea. Siksi suosittelemme, että käytät suomenkielistä versiota, joka on testatumpi ja hieman laajempi ja muutenkin mukava.

Suomenkielinen materiaali kyllä esittelee englanninkielisetkin termit.

Kieli vaihtuu A+:n sivujen yläreunan painikkeesta. Tai tästä: Vaihda suomeksi.


Chapter 12.2: Robot Tournament

About This Page

Questions Answered: Which robot tribe is the best?

Topics: Designing your own algorithm. Programming in something that vaguely resembles symbolic machine language.

What Will I Do? Program. Compete, if you want.

Rough Estimate of Workload:? Depends entirely on how much effort you want to put in.

Points Available: No official O1 points. (For most O1 students, this chapter is completely optional. However, if you are taking Programming Studio 1 in parallel with O1, do note that these assignments are an official part of that course.)

Related Modules: RobotTribes.

../_images/robot_fight.png

Program Your Own Robot Tribe

This chapter consists of a single programming assignment. It continues where Chapter 11.2 left off.

Task description

Define your own robot tribe in RoboSpeak. Try to design it to be effective in duels against other tribes.

Instructions and hints

  • For this assignment, you will submit two files:

    • mytribe.tribe, which contains the RoboSpeak for your tribe; and
    • mytribe.png, which is the image you’ve chosen to depict your tribe’s robots.

    You don’t submit any Scala code.

  • The general instructions for placing the RoboSpeak and image files within the module are in Chapter 11.2.

  • You can use one of the given image files, or you can create or download some other image.

  • It would be nice if you’d start the RoboSpeak program with a comment that introduces your tribe and its behavior. If you want to write other comments in your code, that’s great too, but commenting isn’t mandatory.

  • You must use the RoboSpeak language as defined in Chapter 11.2. Even if you’ve made your own additions to the language, don’t use them in this tribe.

  • The tribe file mustn’t be larger than a few dozen kilobytes. During the tournament (see below), a maximum of one thousand RoboSpeak instructions will be executed during a single robot turn.

  • A+ assesses whether your RoboSpeak program is compatible with the RobotTribes module. You’ll need to pass that preliminary check to participate in the tournament. If your program fails to run or ends up in an infinite loop during this check, A+ will notify you when you submit.

  • You may find that writing programs in RoboSpeak is arduous work. Sorry! ;-)

The Tournament

Duels and matches

The tribe submitted by each student or pair will fight one “match” against each other student-created tribe. A match is a sequence of duels. Each duel is set up as follows:

  • The dueling ground is a 20-by-20 robot world with ten walls at random locations.
  • The two dueling tribes each start with six robots. The robots are initially placed in random locations and face in random directions.
  • In addition to the dueling tribes, there are 30 peaceful robots of the bunny tribe (see bunny.tribe). The bunnies are placed at random locations that aren’t adjacent to any of the dueling robots.

That is, the settings are the same that you get by selecting Tribal → Basic Duel in the app’s GUI.

If one of the tribes wipes its opponent off the map, it wins the duel. It can also happen that neither side is completely annihilated. In that case, the winner is the tribe with more robots after many rounds of play.

The winner of a match is the tribe that won more duels (against the same opponent). The more matches your tribe wins, the better. The winner of the tournament is the tribe that won the most matches (against different tribes).

A training ground: RoboSpeak.fi

Once the Bunnies are no match for your tribe, and you can almost hold your own against the Tigers, too, it’s time to take your tribe to the next arena.

You can send your tribe to a practice battle by going to https://robospeak.fi and creating an account there. (For that, you need to provide an email address. The site uses that address only for activating your account, and does not store it anywhere. The user name that you pick will not be visible to other students, and the same goes for the RoboSpeak code that you submit.)

Please note that RoboSpeak.fi is for practice only. The official tournament will take place after the deadline, and will be run by our sister course Programming Studio 1. To take part in the tournament, you must submit the participating tribe via the form below.

Submitting your solution to participate in the tournament

A+ presents the exercise submission form here.

Results

The robot tournament’s results will be published soon after the Week 12 deadline by the course Programming Studio 1. We’ll also put a link to the results in O1’s final bulletin in Chapter 13.0.

Feedback

Please note that this section must be completed individually. Even if you worked on this chapter with a pair, each of you should submit the form separately.

Credits

Thousands of students have given feedback that has contributed to this ebook’s design. Thank you!

The ebook’s chapters, programming assignments, and weekly bulletins have been written in Finnish and translated into English by Juha Sorva.

The appendices (glossary, Scala reference, FAQ, etc.) are by Juha Sorva unless otherwise specified on the page.

The automatic assessment of the assignments has been developed by: (in alphabetical order) Riku Autio, Nikolas Drosdek, Joonatan Honkamaa, Jaakko Kantojärvi, Niklas Kröger, Teemu Lehtinen, Strasdosky Otewa, Timi Seppälä, Teemu Sirkiä, and Aleksi Vartiainen.

The illustrations at the top of each chapter, and the similar drawings elsewhere in the ebook, are the work of Christina Lassheikki.

The animations that detail the execution Scala programs have been designed by Juha Sorva and Teemu Sirkiä. Teemu Sirkiä and Riku Autio did the technical implementation, relying on Teemu’s Jsvee and Kelmu toolkits.

The other diagrams and interactive presentations in the ebook are by Juha Sorva.

The O1Library software has been developed by Aleksi Lukkarinen and Juha Sorva. Several of its key components are built upon Aleksi’s SMCL library.

The pedagogy of using O1Library for simple graphical programming (such as Pic) is inspired by the textbooks How to Design Programs by Flatt, Felleisen, Findler, and Krishnamurthi and Picturing Programs by Stephen Bloch.

The course platform A+ was originally created at Aalto’s LeTech research group as a student project. The open-source project is now shepherded by the Computer Science department’s edu-tech team and hosted by the department’s IT services. Markku Riekkinen is the current lead developer; dozens of Aalto students and others have also contributed.

The A+ Courses plugin, which supports A+ and O1 in IntelliJ IDEA, is another open-source project. It was created by Nikolai Denissov, Olli Kiljunen, Nikolas Drosdek, Styliani Tsovou, Jaakko Närhi, and Paweł Stróżański with input from Juha Sorva, Otto Seppälä, Arto Hellas, and others.

For O1’s current teaching staff, please see Chapter 1.1.

Additional credits for this page

The notion of programmable “tribes” or “species” that fight each other on a grid comes from a programming assignment by Nick Parlante.

Viljami Nurminen and Rune Pönni contributed additional commands to the RoboSpeak language, drawing on student feedback.

Teemu Sirkiä wrote the code for running the robot tournament. Joonatan Honkamaa and Otto Seppälä suggested an efficiency improvement to TribalBot for tournament purposes.

a drop of ink
Posting submission...