Official NS2 bot

2456

Comments

  • FehaFeha Join Date: 2006-11-16 Member: 58633Members
    The locked one.

    The others are people doing their attempts at creating a bot.
  • Onos Ate MeOnos Ate Me Join Date: 2010-12-31 Member: 76072Members, NS2 Playtester, Squad Five Blue
    A prototype for a bot I've been working on:
    <center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/lGcebrbMjZs"></param><embed src="http://www.youtube.com/v/lGcebrbMjZs" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center>

    I'll release the mod in a few days time as the code isn't up to snuff and needs some cleaning up. The bot is largely based off of the articles in <a href="http://www.amazon.com/Game-Programming-Wisdom-Steve-Rabin/dp/1584500778/ref=sr_1_2?ie=UTF8&qid=1326180129&sr=8-2" target="_blank">AI Game Programming Wisdom</a> First Edition, and to a lesser extent, <a href="http://dev.johnstevenson.co.uk/bots/20585341-The-Quake-III-Arena-Bot.pdf" target="_blank">The Quake III Arena Bot</a>. The primary differences between this bot and the ones others have created is:
    <ul><li>Bots know how to use healers, blink, and to some extent, fly.</li><li>Bots use a prioritized queue to determine what to do instead of kTechId orders. This allows the bot to have multiple objectives at once, e.g. if an injured marine bot is traveling from destination <i>A</i> to destination <i>B</i> and sees a medpack, it will divert course to pickup the medpack and then continue onto destination <i>B</i></li><li>There are multiple state machine classes and a bot can swap between them at run-time.</li><li>Bots use sequences for movement instead of tying movement logic with state logic. To get a bot to run from point <i>A</i> to point <i>B</i> and then look at <i>C</i>, all the state has to do is instantiate a move-to sequence, then look-at sequence and then enqueue it into the bots sequence manager.</li><li>State machines, states and sequences are inheritable. </li><li>Bots think at about 3.3Hz opposed to 20+Hz, reducing load on the server.</li><li>Bots place more importance of self-preservation than on obedience.</li></ul>
  • ZeikkoZeikko Join Date: 2007-12-16 Member: 63179Members, Squad Five Blue, NS2 Map Tester
    Great job! The basics are impressive and much better than me or Jeffco have done. This bot has a lot of potential once it gets high level logic implemented. Great!
  • AsranielAsraniel Join Date: 2002-06-03 Member: 724Members, Playtest Lead, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester, Retired Community Developer
    the bot competition is on :D
  • HarimauHarimau Join Date: 2007-12-24 Member: 63250Members
    edited January 2012
    Nice work, Onos.
    How much autonomy do they have right now? And any commander stuff implemented?

    Btw, just to satisfy my own curiosity, what are "state machines", "states", and "sequences" (and any other related terms)?
  • subshadowsubshadow Join Date: 2003-04-21 Member: 15710Members
    <!--quoteo(post=1893338:date=Jan 10 2012, 04:20 AM:name=Asraniel)--><div class='quotetop'>QUOTE (Asraniel @ Jan 10 2012, 04:20 AM) <a href="index.php?act=findpost&pid=1893338"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->the bot competition is on :D<!--QuoteEnd--></div><!--QuoteEEnd-->

    I can already Imagine 2 different bot-teams fighting eachother ;)
  • Heroman117Heroman117 Join Date: 2010-07-28 Member: 73268Members
    Man everytime a bot set state to "Engage" i knew something was going to pop up and annihilate you.

    You should have the bots keep typing in chat whenever they are in engage mode just so pubs and newbies will be scared sh*tless when they know their impending slaughter is imminent.

    I also noticed in <a href="http://www.youtube.com/watch?v=LXLQuDcqboY" target="_blank">this</a> video that the bots often have names of forum members.

    If it isn't too much hassle, i'd love to be immortalized by having my very own bot :P
  • vizioNzvizioNz InversionNS2.com Join Date: 2003-12-21 Member: 24595Members, Constellation, NS2 Playtester
    <!--quoteo(post=1893371:date=Jan 10 2012, 10:51 AM:name=Heroman117)--><div class='quotetop'>QUOTE (Heroman117 @ Jan 10 2012, 10:51 AM) <a href="index.php?act=findpost&pid=1893371"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Man everytime a bot set state to "Engage" i knew something was going to pop up and annihilate you.

    You should have the bots keep typing in chat whenever they are in engage mode just so pubs and newbies will be scared sh*tless when they know their impending slaughter is imminent.

    I also noticed in <a href="http://www.youtube.com/watch?v=LXLQuDcqboY" target="_blank">this</a> video that the bots often have names of forum members.

    If it isn't too much hassle, i'd love to be immortalized by having my very own bot :P<!--QuoteEnd--></div><!--QuoteEEnd-->
    It tends to be the names of playtesters and developers and are produced within the engine itself (I believe).
  • BJHBnade_spammerBJHBnade_spammer Join Date: 2005-02-25 Member: 42431Members
    thats awesom did you make that waypoints thing your self?

    also how well do the bots follow the way point system?
  • playerplayer Join Date: 2010-09-12 Member: 73982Members
    Excellent work, very useful, especially for developers to test features 'offline'.
  • playerplayer Join Date: 2010-09-12 Member: 73982Members
    Oh and,
    <!--quoteo(post=1893376:date=Jan 10 2012, 04:05 PM:name=vizioNz)--><div class='quotetop'>QUOTE (vizioNz @ Jan 10 2012, 04:05 PM) <a href="index.php?act=findpost&pid=1893376"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->It tends to be the names of playtesters and developers and are produced within the engine itself (I believe).<!--QuoteEnd--></div><!--QuoteEEnd-->
    Bot_Player.lua:18
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->local kBotNames = {
        "Flayra (bot)", "m4x0r (bot)", "Ooghi (bot)", "Breadman (bot)", "Squeal Like a Pig (bot)", "Chops (bot)", "Numerik (bot)",
        "Comprox (bot)", "MonsieurEvil (bot)", "Joev (bot)", "puzl (bot)", "Crispix (bot)", "Kouji_San (bot)", "TychoCelchuuu (bot)",
        "Insane (bot)", "CoolCookieCooks (bot)", "devildog (bot)", "tommyd (bot)", "Relic25 (bot)"
    }<!--c2--></div><!--ec2-->
  • vizioNzvizioNz InversionNS2.com Join Date: 2003-12-21 Member: 24595Members, Constellation, NS2 Playtester
    edited January 2012
    <!--quoteo(post=1893388:date=Jan 10 2012, 11:54 AM:name=player)--><div class='quotetop'>QUOTE (player @ Jan 10 2012, 11:54 AM) <a href="index.php?act=findpost&pid=1893388"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Oh and,

    Bot_Player.lua:18
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->local kBotNames = {
        "Flayra (bot)", "m4x0r (bot)", "Ooghi (bot)", "Breadman (bot)", "Squeal Like a Pig (bot)", "Chops (bot)", "Numerik (bot)",
        "Comprox (bot)", "MonsieurEvil (bot)", "Joev (bot)", "puzl (bot)", "Crispix (bot)", "Kouji_San (bot)", "TychoCelchuuu (bot)",
        "Insane (bot)", "CoolCookieCooks (bot)", "devildog (bot)", "tommyd (bot)", "Relic25 (bot)"
    }<!--c2--></div><!--ec2--><!--QuoteEnd--></div><!--QuoteEEnd-->
    No crap eh? I will be changing those names in a heart beat (lol).
  • Onos Ate MeOnos Ate Me Join Date: 2010-12-31 Member: 76072Members, NS2 Playtester, Squad Five Blue
    edited January 2012
    <!--quoteo(post=1893343:date=Jan 10 2012, 04:07 AM:name=Harimau)--><div class='quotetop'>QUOTE (Harimau @ Jan 10 2012, 04:07 AM) <a href="index.php?act=findpost&pid=1893343"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->How much autonomy do they have right now? And any commander stuff implemented?<!--QuoteEnd--></div><!--QuoteEEnd-->
    The video covers all of the features that are implemented right now. Commanding isn't implemented yet as the first build is centering around deathmatch capabilities of the bot instead of tactical planning and teamwork.

    <!--quoteo(post=1893343:date=Jan 10 2012, 04:07 AM:name=Harimau)--><div class='quotetop'>QUOTE (Harimau @ Jan 10 2012, 04:07 AM) <a href="index.php?act=findpost&pid=1893343"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Btw, just to satisfy my own curiosity, what are "state machines", "states", and "sequences" (and any other related terms)?<!--QuoteEnd--></div><!--QuoteEEnd-->
    sequences are essentially the bot's motor functions, moving the bot to waypoints, firing the weapon at targets, etc.

    states make up a bot's consciousness, finding things to kill, finding healers, following orders, responding to world-events etc.

    a bot's statemachine is its memory and psyche, represent the bot as a whole, determining how good it is, its play style, etc.

    <!--quoteo(post=1893379:date=Jan 10 2012, 09:09 AM:name=BJHBnade_spammer)--><div class='quotetop'>QUOTE (BJHBnade_spammer @ Jan 10 2012, 09:09 AM) <a href="index.php?act=findpost&pid=1893379"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->thats awesom did you make that waypoints thing your self?

    also how well do the bots follow the way point system?<!--QuoteEnd--></div><!--QuoteEEnd-->
    The pathing system is built into ns2 but i built the logic required to get onto and follow the path.
    Right now, bots will arrive within 1m of their destination, this value is arbitrary and can be changed depending on the accuracy required.
  • aeroripperaeroripper Join Date: 2005-02-25 Member: 42471NS1 Playtester, Forum Moderators, Constellation
    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->Bots place more importance of self-preservation than on obedience.<!--QuoteEnd--></div><!--QuoteEEnd-->

    I lol'ed.

    Impressive! Please keep developing this! Looking especially forward to bot controlled commander, and the marine mutiny that ejects him from the chair and causes him to explode into a bunch of robot debris.
  • DeKayDeKay Join Date: 2009-06-08 Member: 67752Members
    Good work man!

    I would have absolutely NO Idea how to do such a thing :)
  • WizardHUNWizardHUN Join Date: 2011-10-23 Member: 128903Members
  • BJHBnade_spammerBJHBnade_spammer Join Date: 2005-02-25 Member: 42431Members
    onos ate me is a beast at coding i would expect nothing less from him. i wonder if he works on ai research for a living?
    or is just that god like when he puts effort in to anything that involves making programs.

    thanks onos we love all of the work you do for us!!!
  • AlignAlign Remain Calm Join Date: 2002-11-02 Member: 5216Forum Moderators, Constellation
    <!--quoteo(post=1893421:date=Jan 10 2012, 09:52 PM:name=Onos Ate Me)--><div class='quotetop'>QUOTE (Onos Ate Me @ Jan 10 2012, 09:52 PM) <a href="index.php?act=findpost&pid=1893421"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The video covers all of the features that are implemented right now. Commanding isn't implemented yet as the first build is centering around deathmatch capabilities of the bot instead of tactical planning and teamwork.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Do they follow commander orders, though? I'd assume yes since that doesn't sound too different from point-and-order, which you already have, but wanted to know for sure.
  • Onos Ate MeOnos Ate Me Join Date: 2010-12-31 Member: 76072Members, NS2 Playtester, Squad Five Blue
    <!--quoteo(post=1893550:date=Jan 11 2012, 06:37 AM:name=Align)--><div class='quotetop'>QUOTE (Align @ Jan 11 2012, 06:37 AM) <a href="index.php?act=findpost&pid=1893550"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Do they follow commander orders, though?<!--QuoteEnd--></div><!--QuoteEEnd-->
    yes, they do
  • Electr0Electr0 Join Date: 2011-10-31 Member: 130337Members
    When can we play with these?
  • Onos Ate MeOnos Ate Me Join Date: 2010-12-31 Member: 76072Members, NS2 Playtester, Squad Five Blue
    Fixed the jittery lerk flight where the lerk would bounce around and look in random directions while flying:
    <center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/9hB71Cp8i6c"></param><embed src="http://www.youtube.com/v/9hB71Cp8i6c" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center>

    <!--quoteo(post=1893837:date=Jan 12 2012, 07:14 AM:name=Electr0)--><div class='quotetop'>QUOTE (Electr0 @ Jan 12 2012, 07:14 AM) <a href="index.php?act=findpost&pid=1893837"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->When can we play with these?<!--QuoteEnd--></div><!--QuoteEEnd-->
    Soon
  • Fluid CoreFluid Core Join Date: 2007-12-26 Member: 63260Members, Reinforced - Shadow
    That looks cool. I noticed it didn't glide, and seemed like it didn't fly at full speed. Is that possible to implement?
  • Electr0Electr0 Join Date: 2011-10-31 Member: 130337Members
    That's cool but how do they act on their own, what happens if you add bots to both teams, do they run around and fight each other?
  • KoruyoKoruyo AUT Join Date: 2009-06-06 Member: 67724Members, Reinforced - Shadow
    Rome wasnt built in one day... one step after another. :)

    Pretty impressive stuff - love your work onos!
  • Electr0Electr0 Join Date: 2011-10-31 Member: 130337Members
    I just want to see basic bot fights working so i can play around with them. :P
  • Onos Ate MeOnos Ate Me Join Date: 2010-12-31 Member: 76072Members, NS2 Playtester, Squad Five Blue
    <center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/7ILrQ2cSBRc"></param><embed src="http://www.youtube.com/v/7ILrQ2cSBRc" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center>
    <center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/riPrGhA7l6A"></param><embed src="http://www.youtube.com/v/riPrGhA7l6A" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center>

    <!--quoteo(post=1894004:date=Jan 12 2012, 08:05 PM:name=Fluid Core)--><div class='quotetop'>QUOTE (Fluid Core @ Jan 12 2012, 08:05 PM) <a href="index.php?act=findpost&pid=1894004"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->That looks cool. I noticed it didn't glide, and seemed like it didn't fly at full speed. Is that possible to implement?<!--QuoteEnd--></div><!--QuoteEEnd-->

    Flight speed can be tweaked but I don't have any plans to allow the lerk to glide right now, too much work for something that only affects one class and is largely aesthetic.

    <!--quoteo(post=1894111:date=Jan 13 2012, 05:34 AM:name=Electr0)--><div class='quotetop'>QUOTE (Electr0 @ Jan 13 2012, 05:34 AM) <a href="index.php?act=findpost&pid=1894111"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->That's cool but how do they act on their own, what happens if you add bots to both teams, do they run around and fight each other?<!--QuoteEnd--></div><!--QuoteEEnd-->

    Basic combat is planned for the first build. For the first build, the bots wont hunt for prey, they'll be more akin to units in a rts, knowing how to navigate and fight, but very not knowledgeable on tactics.
  • ObraxisObraxis Subnautica Animator & Generalist, NS2 Person Join Date: 2004-07-24 Member: 30071Super Administrators, Forum Admins, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Silver, WC 2013 - Supporter, Subnautica Developer, Pistachionauts
    VERY impressive! Progress seems to be going quickly!
  • HarimauHarimau Join Date: 2007-12-24 Member: 63250Members
    edited January 2012
    Nice. Skulks and other aliens run straight at you, though, what can/will you do to give them more erratic behaviour, like to stay out of the marine's field of view and firing cone, and to keep some distance from one another, for instance? How are you planning to implement these manoeuvres and tactics? Would they be a state, a sequence, or some other layer?
  • BalmarkBalmark Join Date: 2002-11-01 Member: 3476Members, Constellation, Reinforced - Silver, Reinforced - Shadow, WC 2013 - Shadow
    Onos Ate Me this looks damn amazing :D
  • Electr0Electr0 Join Date: 2011-10-31 Member: 130337Members
    <!--quoteo(post=1894366:date=Jan 14 2012, 03:57 AM:name=Onos Ate Me)--><div class='quotetop'>QUOTE (Onos Ate Me @ Jan 14 2012, 03:57 AM) <a href="index.php?act=findpost&pid=1894366"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Basic combat is planned for the first build. For the first build, the bots wont hunt for prey, they'll be more akin to units in a rts, knowing how to navigate and fight, but very not knowledgeable on tactics.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Nice one, it's already looking pretty good, I never noticed it before but it looks like the gorges are spraying you with green stars, how magical!
Sign In or Register to comment.