The Soccer-Fun Project Page

Peter Achten

Welcome to Soccer-Fun. Soccer-Fun is an educational project to stimulate functional programming by thinking about, designing, implementing, running, and competing with the brains of football players! It is open for participation by everybody who likes to contribute. It is not restricted to a particular functional programming language.

Currently, Soccer-Fun consists of a library, written in Clean. This project started as part of the course "Abstraction and Composition in Programming" that I have given together with Rinus Plasmeijer at the Radboud University Nijmegen, and that is named "Functional Programming" nowadays.

basic_soccer_fun

With Soccer-Fun you can program footballer brains and run them in the environment that you see here. The brain of a footballer is really a function, as was once explained by nobody less than Johan Cruijff:

"If I play the ball and want to pass it to someone, then I need to consider my guardian, the wind, the grass, and the velocity with which players are moving. We compute the force with which to kick and its direction within a tenth of a second. It takes the computer two minutes to do the same!" (De Tijd, 2 mei 1987)

The brain that you program has a different type than the one above. It takes five parameters: the referee actions, the football (if freely available), all players on the field except you, you, and your current memory. Use these parameters to compute a footballer action such as moving, kicking the ball, as well as a new memory value.

In a nutshell, it is your task to create a team of footballers, equip them with the brains that you have created, and see whether you can beat other teams!

Soccer-Fun was presented for the first time at the informal annual Dutch "Functional Programming Day" in 2007 in Amsterdam, and in more detail at the 2008 Workshop on Functional and Declarative Programming in Education (FDPE'08) in Victoria, B.C., Canada. Read the paper for an introduction to Soccer-Fun and our experience in teaching functional programming with Soccer-Fun. An updated version of that talk was given at the Nijmegen MBSD seminar series in 2008. A shortened version has appeared as Educational Pearl of the Journal of Functional Programming.

Where to find Soccer-Fun

You can find Soccer-Fun at the ICIS subversion server. It consists of two repositories:

  1. SoccerFun: The implementation of the Soccer-Fun framework. This is the core implementation of Soccer-Fun and comes with a smart referee and only one, very simplistic, football team (mini-effies). Everybody can read this repository.
  2. SoccerPlayers: The implementation of footballers, teams, and referees. This is the place to add new teams, footballers, and referees for general purposes as well as exercises. Access to this repository is restricted, because it contains "homework" sensitive material.

To compile and run Soccer-Fun, you need a Clean distribution (version 2.2). You can download it for free.

Participate in Soccer-Fun?

Soccer-Fun is open for participation by anyone who likes to discuss, design, and/or work on the framework and enhance it with new features, make it suitable for other functional programming languages, or even programming paradigms other than the functional one. You can design and implement new football brains, teams, and referees; exercises, and so on.

If you like to join the team, please send an e-mail to . Tell us who you are, why you like to join the team, and how you would like to contribute to its development.

So far, Soccer-Fun has been developed as part of a course, in an incremental way (and it shows...). The first versions were created by myself. Wanja Krah has contributed in many parts of the framework: in particular, he has developed the Ivanov referee, the Wanja team, the referee-based student assignments, and many parts and bits of the user interface.

Project Ideas

There are many ideas for projects to contribute to Soccer-Fun. Currently, the following projects came up after discussion with several people:

Finally

I hope you will have as much fun with Soccer-Fun as I have!

Peter Achten


Page last updated at january 9 2013