IMGD 400X (B 08)
Homework Assignment #8
Due by Web Turn-In: Midnight, Sunday, November 23
(See general homework instructions for turn-in details.)
The purpose of this assignment is to start the process of developing your personal Raven bot implementation, which will eventually be submitted as Homework #12 for entry into the Raven tournament.
- First you need to make your own modifiable copy of the code for Buckland's bot:
- The name of your bot will be your last name, e.g, "Smith", with "_Bot" appended, e.g., "Smith_Bot".
- Create a new folder with your bot name in Raven/Bots and add a corresponding new node in VS Solution Explorer under Bots (right click > Add > New Filter).
- Copy all the files from Bots/RavenBot to your new folder.
- Change the name of all the files in your new folder by replacing "Raven" with your last name, e.g., "Smith_TargetingSystem.cpp", etc.
- Copy Bots/RBBot/RBGoal_Think.cpp and .h to your new folder. Replace "RB" at the front of the names of these two files with your last name followed by underscore, e.g., "Smith_Goal_Think". Replace "RB" similarly in the text of these two files. In particular, note that "RB_BotScriptor" is replaced by, e.g., "Smith_BotScriptor".
- In VS Solution Explorer, add all the files in your new folder to your new node node under Bots (right click > Add > Existing Item).
- Modify all includes in your new folder which refer to files in the RavenBot folder to instead refer to the corresponding file in your new folder.
- In your new file corresponding to Raven_BotMaker.cpp, modify the definition of the constructor by replacing "Raven_Bot" with your bot name, e.g., "Smith_Bot".
- In your new file corresponding to Raven_Bot.cpp, modify the definition of the GetName method to return your last name instead of "Buckland".
- In your new file corresponding to Raven_BotScriptor.cpp, modify the argument to RunScriptFile in the constructor to load your corresponding bot-specific Lua initialization file, e.g. ,"Bots/Smith_Bot/Smith_Bot.lua".
- At the front of Params.lua, change the name of the first bot from "RB_Bot" to your bot name, e.g, "Smith_Bot".
- Now, to test your work:
- Build and run (in debug mode) the Raven solution.
- The game window should display your bot name, e.g., Smith401, as one of the bots. (Set General Bot Info > Show IDs).
- If you get a run-time error, check that the first bot name in Params.lua is exactly the same as your bot name in your version of Raven_BotMaker.cpp.
- Of course, your new bot just does exactly what Buckland's bot did. In order to head off in your own strategic directions for the tournament assignment, you will eventually need to also copy some or all of the code under the "goals" node in the Solution Explorer to your new folder and make the appropriate modifications.
To get started, however, please make the following small modification to the targeting strategy of your bot:
- Instead of always targeting the closest opponent, check first to see if there is an opponent within the range of your current weapon whom you could kill with a single shot, i.e., whose health is less than or equal to the damage inflicted by your current weapon.
- Add a debugging print statement so you can tell when this special case is executed.
- In preparation for the brainstorming session on Friday, Dec. 5th and Homework #10, spend some time carefully observing and analyzing the combat between Buckland's bot, your bot and Burke's Bot (which is also included in the source distribution),
- Does one of the three bot designs perform noticeably better or worse? Why?
- What is the most severe deficiency that you see exhibited? How do you think it could be solved?
What to Turn In
- Zip file containing your new bot folder only.
- Text file containing answers to questions in last two bullet points above.
Please post any questions to the myWPI forum for the course.
- 2 points - Correct bot execution and modification to targeting strategy.
- 1 point - Answers to questions.
Acknowledgement: I would like to thank Robin Burke for allowing the reuse of this assignment.