Want to use Code Rally in academia?
Thanks to Code Rally's simple design and friendly graphics it is the perfect fit for the classroom. As every download of the game comes with a Java/Java EE development environment (Eclipse, IBM WebSphere Developer Tools, IBM WebSphere Application Server Liberty Profile) it is easy to use the tools that come with Code Rally to teach Java and Java EE programming.
You are able to run your own server for your students to race on - this can be school, room or class wide and with it you will be able to identify which students are doing well and which need some help based on their race times. This also enables you to have healthy competition between students who can be competing for top place!
For a beginner's programming class students can be introduced to the game by racing an intermediate AI - this does not require any coding but introduces the students to how to race the game. Once they have raced an intermediate car they can then be moved onto coding their own basic AI.
The simplest AI only needs 3 lines of code adding to be able to navigate around the track - see how to create your first AI for information on how to create an advanced car with only a couple of lines of code. Once your students have a basic AI that can navigate around the track they can iterate over their code adding one or two lines of code that will change how the car behaves. As soon as they want to see how their changes have changed the car's behavior they can race again - races take less than a minute to run before the students can watch how their vehicle did.
Once you have your students modifying their cars to perform better you can introduce them to new tracks - each with their own challenge to overcome (be it building a car that handles corners well to a car that avoids collisions) - to find out what each track introduces see our post covering the 6 different tracks in Code Rally. You can also introduce new challenges on the tracks - by having the students racing against cars you have created you can challenge them to improve their code to be able to beat your own entry.
Racing in teams
If you have limited computers or want to encourage teamwork between your students you can have them working in teams - this can be done by having each student working on their own AI and entering it into races with a team username, or by sharing the code between students on the same or different machines. To be able to have different machines sharing the same code you will need to create a free project on the Academic JazzHub and add the Rational Team Concert plugin to the Code Rally eclipse install. This will then let you put students into teams which share the same code between machines (you will be able to see their code as well as which students made which changes as well. For more information on how to get this working please ask in our forums and someone from the development team will be able to walk you through what is needed.
Although Code Rally is designed to be accessible and easy to get started it can be used as an advanced teaching aid. Here is a list of challenges you can ask your students to beat in the game:
- At the start of the race get a list of all of the checkpoints in the track, and then calculate the optimal racing line to use to pass through those checkpoints. This is more challenging than a typical Code Rally AI which will only look a couple of checkpoints ahead when determining the position and speed it should be traveling along.
- Complete a race without crashing into any obstacles - the majority of the tracks have obstacles placed in locations that most AIs will drive through so putting in good obstacle detection and avoidance is a challenge.
- Complete a race without going off the track. This isn't too difficult on the easy tracks such as figure 8 however when you start racing on the more complex tracks this becomes increasingly challenging.
- Travel around the track against the flow of traffic - this is difficult as you can't rely onCheckpointUpdated() to be called and so will have to very accurately track where your vehicle is in relation to the track.
- Crash derby - have your students enter a race against an AI designed to complete the race. Their AI's job is to stop the car from completing the race - it is possible but if you have 5 students against one car their AIs will need to work as a team to avoid getting in each others' way. A race will end after 5 minutes 30 seconds of in-game time.
These challenges are currently not built into the game - you will need to manually verify if a challenge has been completed by watching the race replay. Of course these are just a list of challenges we have run at code rally challenge events - if you can think of more challenges you can set let us know!
If you would like more information on how to use Code Rally in education, or if you have any requests/suggestions then visit our forums - the development team would love to hear your thoughts and feedback.