1 / 1

Packrat

Investigation into Computer AI, and the Math Behind It. Joseph Pegues, Advisor: Dr. Christopher Elmer Shepherd University http://webpages.shepherd.edu/jpegue01/. Introduction. Packrat. Teleport / Backwards. Guardbot.

farica
Download Presentation

Packrat

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Investigation into Computer AI, and the Math Behind It.Joseph Pegues, Advisor: Dr. Christopher ElmerShepherd University http://webpages.shepherd.edu/jpegue01/ Introduction Packrat Teleport / Backwards Guardbot The concept of Packrat was a bot that would horde items before attempting to attack anyone. Before attempting to enter a combat state the bot goes through a list of items. If it has enough then it is allowed to go into that combat state and ceases item searching. tem = Fdi_SHELLS;//FindItem("Shells"); if (item) { index = ITEM_INDEX(item); if (ent->client->pers.inventory[index] >= ent->client->pers.max_shells-85) { item = Fdi_CELLS;//FindItem("Cells"); if (item) { index = ITEM_INDEX(item); if (ent->client->pers.inventory[index] >= ent->client->pers.max_cells-150) { The purpose behind the project was to examine computer artificial intelligence and to show that artificial intelligence could be applied to many different projects. To do all this, a copy of Quake 2, and a computer AI bot, 3zb2, were acquired. A bot is a multiplayer opponent who is computer controlled, but designed to act like a human opponent. The hope was that by examining 3zb2 and altering its code to produce bots with variations, that it would show that computer AI can perform a number of different tasks even in a limited environment. This would imply that by removing the limiting environment the only limitation of AI would be the imaginations and coding skills of the AI creator. Guardbot is a bot with a job to do. It is given a specific item in the game to hunt out, and once it is found the bot stays within short distance of it. It's objective is to prevent anyone from getting the item. if(foundRocket != 1) Bot_SearchItems(ent); if(zc->second_target != NULL ) { if((zc->second_target->s.origin[2] - ent->s.origin[2]) > 32 && !ent->waterlevel) { RL = zc->second_target->moveinfo.start_origin[2]-ent->s.origin[2]; if(foundRocket==1&&(RL <= lh || RL >= hh) { VectorAdd(zc->second_target->moveinfo.start_origin,ent->s.origin,temppos); } Telebort and Backwards are two bots born from opposite logic patterns. When taking into account things like shooting and moving to objects, the bot makes calculations based off its movement speed. For teleport this speed has been multiplied by 10, and for backwards negative one. Interestingly, Teleport exhibits an almost chaotic behavior because it can never get to where it wants to be properly. This chaotic behavior seems to stabilize as more bots are added to the game. 3ZB2 Conclusion Santabot In this project several different logic patterns for the bots were created. Even in the limited environment of Quake 2 it is possible to create AIs that do more than simply shoot at an opponent. However the bots we're not only limited by the environment in this project, they were also limited by 3zb2. With more time and a better understanding of how Quake 2 works, it would be possible to create even more bots, possibly even some with the ability to plan. 3zb2 was originally created by Ponpoko (internet name), and was acquired from his website http://ponpoko.tri6.net/3zb2/. The bot has not had any development for several years, but was strong enough to allow for modifications that wouldn't result in crashes over small changes in the code. Programming wise the bot has no planning in its thinking patterns. Instead the bot is reliant on information that it knows to decide what course of action is best at the moment. This information is gathered in two ways. The first is visually by recognizing what is in front of it. The second is by recorded route information that is stored in a file outside of the bot code. While this type of bot is relatively simple in terms of computer AI used in video games today, this AI excels in the simplistic environment of Quake 2. It is capable of near perfect shooting, always knows where items are on a map that it has routes for, and always chooses the best option in a given scenario. Santabot is a bot that was designed as a noncombatant. Commands dealing with firing at opponents have been removed and replaced with drop item commands. Thereby giving other combatants items that the bot is holding onto. EnemiesAbound /GhostsAbound EnemiesAbound and GhostsAbound are also created from opposite logic patterns. EnemiesAbound believes itself to be constantly confronted by enemies and so is constantly ready to attack an opponent. GhostsAbound is a bot that never believes itself to confronted by an enemy so never fires its weapon. Interestingly, EnemiesAbound is slightly smarter than 3zb2, and at times, even acts more like a human opponent as opposed to a computer controlled bot. Bibliography • Quake 2 was developed by id Software and the game box artwork belongs to them. www.idsoftware.com • 3zb2 was created and owned by Ponoko. It and the code behind it are owned by him. http://ponpoko.tri6.net/3zb2/ • This poster template was created by MegaPrint, and downloaded from: http://www.postersession.com/templates.php

More Related