This is a group exercise, so you should be working in pairs of two students. It's 30% of your final grade.
The Goal is to practise writing readable, maintainable and reliable code collaboratively.
-
One student of your group forks the code from https://github.com/advanced-geoscripting-2021/random_walker.git
-
This student invites the other student as a collaborator to the forked repository. Now you can both work on the code.
-
Adapt the code to fulfil the requirements (see below).
-
Code review: Each group reviews the code of another group.
-
Improve your code based on the review you got.
In this repo you find a basic implementation of a random walk simulation in 2-dimensional space taken from this blogpost. Running the code yields an image which shows the path of the random walk.
The program works but it is not very readable. In addition, you should **extend the program based on the requirements listed below.
Remember to apply the best practices in scientific computing to make the code more readable, maintainable, reusable and efficient.
Extend the program so the following requirements are met:
- The program should be able to simulate multiple random walkers.
- The program should be executable from the command line.
- The user should be able to specify the number of random walkers through a command line parameter.
- Document the dependencies and instructions of how to run the program in your README.md.
- Create three different types of walkers, e.g. a "fast walker" which has a bigger step size.
- Add a "landscape" in which the random walkers are walking in which contains obstacles which the walkers cannot cross (e.g. a lake)
- Invent and implement another functionality of your own.
Be creative here! :)
Review the code of another group: (tuesday afternoon or wednesday morning)
- Does it work properly? Try to make it fail!
- Are the best-practices implemented in the code?
- Is the documentation clear?
- Can you adapt the code easily? E.g. try to create a new type of random walker which moves two cells per iteration.