mdinfotech.net  



The learning outcomes of this project are to teach you:

Goal 1: to teach yourself a new technology
As someone working in coding, it is imperative that you can keep your skills up to date, and flexible. This means you must become a lifelong learner. It means you must be able to identify skills you lack, and you must figure out the most efficient way to learn it and the platform to use it on.
Goal 2: to use Github
3 Reasons Why You Should Learn Github, 'nuf said.
Goal 3: Collaboration
Defined as "the action of working with someone to produce or create something." A number of soft skills that employers look for in CS related jobs, including communication and leadership, require collaboration.

Once you have learned the new technology, and to use Github, and completed a few individual assignments, you will take part in a group project. All assignments in this unit count towards the "Term Project" portion of your grade, which is 20% of your total mark on the final report card.

Your first task in the 2020 AP Term Project is to learn python.

Here is an article to read. You may select any method you choose to learn it: Learn Python: Tutorials for Beginners, Intermediate, and Advanced Programmers.

To run python, you have a number of options available to you.

  1. Some websites will let you code and run basic python online. This may be the fastest way to get started.
  2. You can install and run the python interpreter, use a text editor to code it, and command line to run it. This is how I do it.
  3. You can also find an IDE (Integrated Development Environment) if command line scares you.

To initially learn python, scripting and running the code through a website is fine. However, once we get started in graphics (we will be doing an assignment with last year's netbot's project), and for the final group project, you will need a way to run python on your home computer.

How you ask? Google it. (See Goal 1 of the learning outcomes for the term project).

What is Git vs Github? Git is an open-source tool developers install locally to manage source code, while GitHub is an online service to which developers who use Git can connect and upload or download resources.
  1. Watch Git and GitHub for Poets
  2. Join Github.
  3. Install Git
  4. Create a new repository and push some existing code.
  5. Visit Github and see your repository online. This is how you will be handing in your python projects.

Write Random Board from CS 11 in Python.

To hand in: Submit a link to your Github repository on Google Classroom.

The next step in learning python is to solve some problems using algorithms that you could write quite easily in Java, but to figure out how to write them in Python. Below is a link to a string processing problem that will allow you to mark your own code against their test cases.

Solve this problem: DNA Pride! in Python.

If you are not sure how to solve it in Python, I suggest writing a solution in Java first, then figure out how to write the code in Python.

Once you write a successful solution, click "Compile and Test". It will look something like this:
compile and test.
Once your solution passes the test case, click "Submit" and take a screen shot of the results. It will look something like this:
submit.

Note: your language will say "Python".

To hand in: Submit a link to your python code on Github and a screenshot of your submission results on Google Classroom.

When we get to Netbots, you will need to have a good grasp of the Binary Search. This is an opportunity to review that algorithm.
  1. Review the Binary Search: Binary Search Tutorial.
  2. Pick any one of the problems rated "Easy": Binary Search Practice Problems.
  3. Once your solution passes the test case, click "Submit" and take a screen shot of the results. It will look something like this:
    submit.
  4. Note: your language will say "Python".
  5. To hand in: Submit a link to your python code on Github and a screenshot of your submission results on Google Classroom.

NetBots is a python programming game. The game consists of a number of robots, 4 by default, that battle in an arena. To play, a python program must be written. The program can control the robot's speed and direction, scan for enemy robots and fire exploding shells from its canon. Robots suffer damage if they are in collisions or hit by exploding shells. The game ends when only one robot remains or the time limit is reached. Normally, many games are played in a tournament to determine which robot is the overall winner.

Over the next few exercices, you will be downloading and running Netbots. You will write your own robots, and eventually, put your robots up against robots from other students in the class.

Watch Netbots Lesson 1

Download Netbots on your computer at home and get it up and running.

Watch Netbots Lesson 2
  1. Write a simple robot based on the demo robots.
  2. Run the robot against the 4 demo robots. Take a screen shot of the server output once the tournament is finished. (see example in netbots readme
  3. Record a ten second clip of your bot battling the demo bots. You can use the Windows Game Bar to do this How to Video Screen Capture. The videos will get saved in Videos/Captures.
  4. Create a private repository on github, share is with lwear, and upload the robot file to the repository.

To hand in: Submit a link to your repository on Github, upload your video or a link to your video on Youtube, and a screenshot of your tournament results on Google Classroom.

Your next task is to write a better robot that can beat the demo robots included with Netbots.

  1. Run the robot against the 4 demo robots in a tournament of 100 games. Your robot should get the most points and appear first in the list.
  2. Take a screen shot of the server output once the tournament is finished. It will look something like this:
                   
                        ---- Score -----  ------ Wins -------  --------- CanonFired ----------
                  Name      Points     %    Count   AvgHealth    Count   AvgDamage   TotDamage  IP:Port
     ------------------------------------------------------------------------------------------------------------------
         Lighthouse v1         480  38.2       20       94.44     5796        3.63    21020.81  127.0.0.1:20003
         ScaredyCat v1         290  23.1        0        0.00        0        0.00        0.00  127.0.0.1:20004
       HideInCorner v1         282  22.4        0        0.00        0        0.00        0.00  127.0.0.1:20002
                Wearsy         118   9.4        0        0.00        0        0.00        0.00  127.0.0.1:20006
         WallBanger v1          88   7.0        0        0.00        0        0.00        0.00  127.0.0.1:20005
     ------------------------------------------------------------------------------------------------------------------
                   
  3. Record a ten second clip of your bot battling the demo bots. You can use the Windows Game Bar to do this How to Video Screen Capture. The videos will get saved in Videos/Captures.
  4. Create a private repository on github, share is with lwear, and upload the robot file to the repository.

To hand in: Submit a link to your repository on Github, upload your video or a link to your video on Youtube, and a screenshot of your tournament results on Google Classroom.

Your next task is to write a better robot that implements a binary search scan. This bot will be tested against Netbots creator Doug's better bots.

  1. Watch NetBots Game Concepts
  2. Watch Commit Netbot Pitfalls for feedback on the Exercise 2 bots.
  3. Write a better bot that implements a binary search scan. Ensure you limit the number of output lines to the console to critical information only. Outputting too much information will slow down your bot and could make it lose.
  4. Run the better robot against 3 of your own robots, including those you handed in for Exercises 1 and 2, in a tournament of 100 games. Your better robot should get the most points and appear first in the list.
  5. Take a screen shot of the server output once the tournament is finished. It will look something like this:
                   
                        ---- Score -----  ------ Wins -------  --------- CanonFired ----------
                  Name      Points     %    Count   AvgHealth    Count   AvgDamage   TotDamage  IP:Port
     ------------------------------------------------------------------------------------------------------------------
         Lighthouse v1         480  38.2       20       94.44     5796        3.63    21020.81  127.0.0.1:20003
         ScaredyCat v1         290  23.1        0        0.00        0        0.00        0.00  127.0.0.1:20004
       HideInCorner v1         282  22.4        0        0.00        0        0.00        0.00  127.0.0.1:20002
                Wearsy         118   9.4        0        0.00        0        0.00        0.00  127.0.0.1:20006
         WallBanger v1          88   7.0        0        0.00        0        0.00        0.00  127.0.0.1:20005
     ------------------------------------------------------------------------------------------------------------------
                   
  6. Record a ten second clip of your bot battling the demo bots. You can use the Windows Game Bar to do this How to Video Screen Capture. The videos will get saved in Videos/Captures.
  7. Create a private repository on github, share is with lwear, and upload the robot file to the repository.

To hand in: Submit a link to your repository on Github, upload your video or a link to your video on Youtube, and a screenshot of your tournament results on Google Classroom.

This video discusses the differences between each level of each bot yours are being tested against. It also discusses the results from the weekend and takes a deeper look at how to use stats to improve your robot. Netbots Feedback.

Your final task is to write the Super Ultimate Bestest Ever King of the Mountain Bot of all bots. You will have the opportunity to update your bot and see how it performs a maximum of 8 times.
  1. This bot will be tested against all other bots in the class.
  2. This bot will also be tested against Netbots creator Doug's better bots (Levels 1-8, the higher the number, the better the bot). The Exercise 2 bots were put up against Doug's bots and no one beat Level 3. (Results from the Exercise 3 bots that are handed in on time will be posted Monday).
  3. Nightly tournaments will be run automatically by a script each night Monday June 8 - Monday June 15, and results will be posted the next day so you can see how your bot is performing.
  4. Name this bot yournamefinal.py. For example, Fred would name his file fredfinal.py. On the first day of the challenge, submit a link to this bot file on Github. Note: it *must* contain a working bot. This link will be used daily by a script to upload your current bot for the nightly tournaments. (Do NOT submit a link to your folders robot, because our script needs to access your bot directly). Each time you wish to update your bot, you must directly edit the code in Github and commit the changes. See images below:
    Github EditGitHub Commit
  5. You can update your bot as often as you want. Please read the marking criteria below to see how you will be assessed.
  6. To get assistance, submit questions to the NetBots Github Help. Watch directions for submitting questions to Netbots to see how to do this.
  7. To learn from questions other students ask, "Watch" the Netbots repository on Github and you will get notifications of all conversations that are happening.
    watch github

To hand in on the first day of the Challenge: Name this bot yournamefinal.py. Submit a link to this bot file on Github. Note: it *must* contain a working bot. This link will be used daily by a script to upload your current bot for the nightly tournaments. (Do NOT submit a link to your folders robot, because our script needs to access your bot directly). Each time you wish to update your bot, you must directly edit the code in Github and commit the changes.


Assessment:

1) Bot Performance Improves In Competition Rankings
ExceptionalVery GoodGoodSatisfactoryDevelopingNot Done
Bot improves 4+ timesBot improves 3 timesBot improves 2 timesBot improves 1 times Bot improves 0 times with 2+ updates.0 or 1 updates only thus impossible to demonstrate improvement.

2) Bot Beats Dougbots (Levels 1-8)
ExceptionalVery GoodGoodSatisfactoryDevelopingNot Done
Bot beats level 7 or higherBot beats level 5 or higherBot beats level 3 or higherBot beats level 1 or higher Bot never beats Level 1, but is updated at least twice.0 or 1 submissions do not beat Level 1.

3) Valid Questions Asked on Github Netbots Help
SatisfactoryDevelopingNot Done
2 or more thoughtful coding or algorithm questions submitted. 1 or more questions submitted. 0 questions submitted.