Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
pelita [2018/09/07 14:43] – [Network games] Rike-Benjamin Schuppnerpelita [2023/08/31 17:50] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Programming Project ====== ====== Programming Project ======
  
-[[https://github.com/ASPP/pelita_template|{{ :pelita_gui.png?nolink&600 }}]] +[[https://github.com/ASPP/pelita_template|{{ https://github.com/ASPP/pelita_template/raw/main/pelita_GUI.png?nolink&600 }}]] 
-Pelita is a PacMan™ like game. Two teams each of two bots are placed in a maze with food pellets. The maze is split into two parts, the left one belongs to the team on the left (the blue team), the right one belongs to the team on the right (the red team). When a bot is in its own homezone it is a ghost. A ghost can defend its own food pellets by killing the enemies. When a bot is in its enemy's homezone it is a pacman and can eat the enemy's food.+Pelita is a Pac-Man like game. Two teams each of two bots are placed in a maze with food pellets. The maze is split into two parts, the left one belongs to the team on the left (the blue team), the right one belongs to the team on the right (the red team). When a bot is in its own homezone it is a ghost. A ghost can defend its own food pellets by killing the enemies. When a bot is in its enemy's homezone it is a pac-man and can eat the enemy's food.
  
-Your task is to write a bot implementation. You have to implement the intelligence to navigate your bots successfully through the maze, kill the enemy's pacmen, and eat the enemy's food.+Your task as a group is to write a bot implementation. You have to implement the //intelligence// to navigate your bots successfully through the maze, kill the enemy's pacmen, and eat the enemy's food.
  
 No special previous knowledge about machine learning, artificial intelligence, deep neural networks, <color #949494>[insert your buzzword here]</color>, is required! All you need is a bit of Python knowledge and having attended the first three days of ASPP ;) No special previous knowledge about machine learning, artificial intelligence, deep neural networks, <color #949494>[insert your buzzword here]</color>, is required! All you need is a bit of Python knowledge and having attended the first three days of ASPP ;)
  
 ==== Setup ==== ==== Setup ====
-Install pelita:+Fork the group repo (where ''N'' is your group number)''https://github.com/ASPP/GroupN.git''
  
-    pip3 install git+https://github.com/ASPP/pelita.git +See the documentation directly on ''https://github.com/ASPP/GroupN''
- +
-Clone the group repo (where ''N'' is your group number): +
- +
-    git clone https://github.com/ASPP/groupN.git +
- +
-See the documentation directly on https://github.com/ASPP/groupN+
  
 ==== Intent ==== ==== Intent ====
Line 27: Line 21:
 Write tests for the part of your code which are testable, decide what parts you //can// test, what parts you //should// test, what parts you //must// test, and also what parts //can not// be tested. Use git and GitHub, use branches or pull-requests: is this going to facilitate your work or is this adding a useless overhead? Feel invited to explore the trade-offs involved! Write tests for the part of your code which are testable, decide what parts you //can// test, what parts you //should// test, what parts you //must// test, and also what parts //can not// be tested. Use git and GitHub, use branches or pull-requests: is this going to facilitate your work or is this adding a useless overhead? Feel invited to explore the trade-offs involved!
  
-The idea of the group project is **not** to write the coolest AI-powered bots! Remember that and don't get carried away by the competition :)+The idea of the group project is **not** to write the coolest AI-powered bots! Remember that and don't get carried away by the competition. More about this in the next paragraph.
  
-==== Working in a team ====+==== The Competition Factor==== 
 +Some of you will feel the rush of competition, and when working under time pressure may start skipping good coding practices to get “something that works” or “to win”. 
 +Others may be annoyed by it, and may feel it is important to stay focused on good practices and don't care much about the result of the competition. 
 + 
 +In part, this is the way humans work, so there is not much you can do about it. 
 +But it may help to frame the experience in a different way.  
 + 
 +Back in the lab you will be also subject to all kinds of pressure. A typical situation is your boss asking for results and not caring about you writing nice, tested and reusable code. You will be often asked to just “deliver”, independent of the standards you set for yourself. 
 + 
 +Look at the programming project as a paradigmatic example of a real life situation. How do //you// work under pressure? How do //you// handle the trade-off between “just deliver” and “live up to your own standards”? How do //you// deal with the fact the other people, be it your boss or your team mates, put pressure on you?  
 +There is a lot to learn in such a context! 
 + 
 +==== Working in a Team ====
 The group setting adds some additional hurdles to the challenge: you will be confronted with group dynamics which go beyond each member's technical skills. Try and have a curious and open attitude towards this experience, even when it becomes frustrating, annoying or even irritating. Everyone makes mistakes: enjoy making your own and helping other discover theirs. The group setting adds some additional hurdles to the challenge: you will be confronted with group dynamics which go beyond each member's technical skills. Try and have a curious and open attitude towards this experience, even when it becomes frustrating, annoying or even irritating. Everyone makes mistakes: enjoy making your own and helping other discover theirs.
  
-Remember that as a group you can define your own rules. You are responsible as a group for keeping a nice and stimulating atmosphere during your long programming sessions. Talk about how to distribute the work and how to distribute responsibility: these things don't happen on their own by magic! Be open in the group about problems, even inter-personal problems ;) And, if nothing else helps, come to us and we will help you!+Remember that as a group you can define your own rules. You are responsible as a group for keeping a nice and stimulating atmosphere during your long programming sessions. Talk about how to distribute the work and how to distribute responsibility: these things don't happen on their own by magic! You will be amazed at discovering how many of the things you take for granted are not granted at all for other people. Be open in the group about problems, even and especially about inter-personal problems ;) And, if nothing else helps, come to us and we will help you!
  
 The final tournament is intended as a final party, where you can have fun watching **your** "product" running around in a maze. It doesn't really matter which group is going to win. Remember: no bot will be harmed in the making of this film ;) The final tournament is intended as a final party, where you can have fun watching **your** "product" running around in a maze. It doesn't really matter which group is going to win. Remember: no bot will be harmed in the making of this film ;)
Line 43: Line 49:
     * Are you allowed to work alone and putting on your headphones?      * Are you allowed to work alone and putting on your headphones? 
     * Are you allowed to work outside of the classroom?     * Are you allowed to work outside of the classroom?
-    * Are you allowed to push to ''master'' without having a review by another member of the team?+    * Are you allowed to push to ''main'' without having a review by another member of the team?
     * <color #949494>[If this were my group, the answer would be ''No'' to all questions :)]</color>     * <color #949494>[If this were my group, the answer would be ''No'' to all questions :)]</color>
   * choose persons responsible for certain roles. You need at least:   * choose persons responsible for certain roles. You need at least:
     * a group speaker, and most probably…     * a group speaker, and most probably…
-    * … a release manager +    * … a release manager (the git "pope")
     * <color #949494>[those two shouldn't be the same person]</color>     * <color #949494>[those two shouldn't be the same person]</color>
   * take time, once in a while, to step back and have a look at how the group work is going and to discuss if you need adjustments   * take time, once in a while, to step back and have a look at how the group work is going and to discuss if you need adjustments
Line 61: Line 67:
   * later we will make [[#network_games|network bots]] available which are more advanced than the demo ones, so that you can try your bots against more serious opponents   * later we will make [[#network_games|network bots]] available which are more advanced than the demo ones, so that you can try your bots against more serious opponents
   * do **not** waste hours debugging Pelita or wondering about exotic cases: ask the tutors, they are there for you and are happy to help!   * do **not** waste hours debugging Pelita or wondering about exotic cases: ask the tutors, they are there for you and are happy to help!
 +
 +At the end of the first session:
 +  * Discuss the above points and write down the outcome of that discussion, even just as a list of bullet-points, into a new file called ''collaboration.md'' in your group repo and push it, so that the faculty can review it :-)
  
  
Line 66: Line 75:
  
 <alert type="warning" icon="fa fa-warning"> **WARNING** <alert type="warning" icon="fa fa-warning"> **WARNING**
-  * The repos are going to be **frozen** on Saturday September at exactly **17:00**!+  * The repos are going to be **frozen** on Saturday September at exactly **17:30**!
   * Be sure there is a file in your repo named ''groupN.py'', where ''N'' is your group number   * Be sure there is a file in your repo named ''groupN.py'', where ''N'' is your group number
-  * The file should define the string ''TEAM_NAME'' and the function ''move(turngame) ⟶ (dxdy)''+  * The file should define the string ''TEAM_NAME'' and the function ''move(botstate) ⟶ (x,y)''
 </alert> </alert>
  
Line 76: Line 85:
     * ''1'' point for a draw     * ''1'' point for a draw
     * ''2'' points for winning a game     * ''2'' points for winning a game
-    * the maze is a random ''32×16'' maze without dead-ends +    * the maze is randomly chosen for each game among the built-in mazes of normal size (32x16) 
-    * the side (blue/red) is randomly assigned+    * your team'side (blue/red) is randomly assigned
   - a knockout round (based on the rank from the round-robin):   - a knockout round (based on the rank from the round-robin):
     * semifinal 1: the 1st team against the 4th     * semifinal 1: the 1st team against the 4th
Line 83: Line 92:
     * **final**: the two winners of the semifinals against each other     * **final**: the two winners of the semifinals against each other
     * **last-chance final**: the winner of the final against the 5th team from the round-robin     * **last-chance final**: the winner of the final against the 5th team from the round-robin
-  - <color #949494>(if there is time and if the tutors are willing to risk):</color>+/*  - <color #949494>(if there is time and if the tutors are willing to risk):</color>
     * <color #949494>**the tutor-humiliation round**: the winner of the students against the tutors' bots </color>     * <color #949494>**the tutor-humiliation round**: the winner of the students against the tutors' bots </color>
 +*/
  
-==== Network games ==== 
  
 +==== Network games ====
 To play against the more advanced bots in the network, start a network game: To play against the more advanced bots in the network, start a network game:
  
-    pelita groupN.py remote:tcp://10.0.2.144:30001 +    pelita groupN.py SCAN 
-    pelita groupN.py remote:tcp://10.0.2.144:30002 + 
-    pelita groupN.py remote:tcp://10.0.2.144:30003 +The keyword SCAN allows you then to select a network player on the command line
-    pelita groupN.py remote:tcp://10.0.2.144:30004             + 
-    pelita groupN.py remote:tcp://10.0.2.144:30005 +(Of course, remember that your bot can also play on the right side, so make sure to test eg''%%pelita SCAN groupN.py%%'' as well.) 
-    pelita groupN.py remote:tcp://10.0.2.144:30006 +
-    pelita groupN.py remote:tcp://10.0.2.144:30007+
  
-(Of course, remember that your bot can also play on the right side, so make sure to test eg. ''pelita remote:tcp://10.0.2.144:30001 groupN.py'' as well.)