Page 8 of 23 FirstFirst ... 6 7 8 9 10 18 ... LastLast
Results 71 to 80 of 223

Thread: [WIP] GuiltySpark

  1. #71

    Re: [WIP] HaloBot

    Not sure if this is feasible or not, but would it be possible to add "alternate" routes that the bot can randomly choose to take? Would make it more life-like than having a bot that just runs around a set path all the time.
    Reply With Quote

  2. #72
    chilango Con's Avatar
    Join Date
    Aug 2006
    Location
    Victoria, BC, Canada
    Posts
    8,397

    Re: [WIP] HaloBot

    What it does right now is the pathfinding algorithm is given a destination and it returns the shortest path there. It's creating a list of points you need to visit in order to reach that goal. That list is then used by the walking thread to direct you along it. To create alternate routes, perhaps it could pick random points near the goal, then from there go to the goal?

    I need a way to simulate a human player and a lot of variables go into that. I'm not sure what the best way to tackle the AI is.
    Reply With Quote

  3. #73

    Re: [WIP] HaloBot

    Or it could get approximately half way to the goal, pick a new and completely random location, navigate to that, and then navigate to the goal. That should add lots of variety. Then add random goal choosing and a loop option (just a tickbox or something) so the bot is constantly going from goal to random sub-goal to goal, choosing a new goal, etc...

    Edit: Actually, if you add the random goal choosing after it hits a goal and the "loop" option is checked, you wouldn't need the sub-goal stuff since it would be going from random goal to random goal.
    Last edited by Cortexian; May 22nd, 2010 at 01:14 AM.
    Reply With Quote

  4. #74
    chilango Con's Avatar
    Join Date
    Aug 2006
    Location
    Victoria, BC, Canada
    Posts
    8,397

    Re: [WIP] HaloBot

    I was thinking about that, but then I realized I can randomize the paths right inside the pathfinding algorithm. At each step of the algorithm, it find the most promising adjacent node and moves on to that one. This is determined by it's distance from the start along the path and its distance from the finish in a straight line. However, what I can do is add a random number to this cost, meaning it won't always choose the shortest path. This may end up in a jagged path though, not necessarily an alternate route. A solution might be to add a persistent cost to all nodes in the areas visited recently so that it won't reuse them.

    Additionally, if I add additional information to the graph like openness, then I can add the openness score to the cost at each step meaning it will prefer areas with cover. Users will still have to define which areas are open/dangerous.
    Last edited by Con; May 22nd, 2010 at 02:57 PM.
    Reply With Quote

  5. #75
    Senior Member TEMPTii's Avatar
    Join Date
    Aug 2009
    Location
    Colorado Springs, CO
    Posts
    155

    Re: [WIP] HaloBot

    Con, what method did you use to send the keystrokes to halo? Given the sendkeys function didn't work, what did you use, keyhook? I'm making an application that spams a certain key or keys and I want to integrate it into Halo but I cant find/make a good keyhook...
    Reply With Quote

  6. #76
    chilango Con's Avatar
    Join Date
    Aug 2006
    Location
    Victoria, BC, Canada
    Posts
    8,397

    Re: [WIP] HaloBot

    I'm using SendInput.
    I made a post for you a few pages back but I guess you missed it.
    http://www.modacity.net/forums/showt...l=1#post536751

    You should also check the byte at 0x00622058 (1.08) as well as the current window title. If that byte is 1, then there are no menus, console, or chat boxes open. If the current window title is Halo then we're not minimized and finally input can be sent.



    As for the AI, I think I'm going to make the bot use a list of tasks, each with a priority. Their priority will be updated as it plays and it will only work on the highest priority task at any time. Tasks may be things like reaching the objective, killing enemies, and getting items. As you get closer to an enemy along the path to the objective, then the kill enemy task priority will increase. Its priority could also increase as a function of health and current weapon. If its priority exceeds the reach objective task, then it will pathfind to the enemy hopefully kill it, ending the task. The next highest priority will then be reaching the objective again. The list of tasks should be remade and randomized for each life to mix things up.
    Reply With Quote

  7. #77
    Senior Member TEMPTii's Avatar
    Join Date
    Aug 2009
    Location
    Colorado Springs, CO
    Posts
    155

    Re: [WIP] HaloBot

    Oops, didn't see. Thanks for that (:
    Reply With Quote

  8. #78
    Neanderthal Dwood's Avatar
    Join Date
    Sep 2008
    Location
    Wouldn't u like to know?
    Posts
    4,189

    Re: [WIP] HaloBot

    Allow us to set "split points" where there are points where the people are able to deliberately have randomness in what it does- 1 point can split into 2+ different paths, and the bot picks the way in semi-random fashion.
    Reply With Quote

  9. #79
    chilango Con's Avatar
    Join Date
    Aug 2006
    Location
    Victoria, BC, Canada
    Posts
    8,397

    Re: [WIP] HaloBot

    That's a good idea but it doesn't work for big maps like bloodgulch. Putting split points here and there will simply cause the pathfinding to potentially add an extra node to the path when it comes across one of these points. It wouldn't make the bot choose to walk through the caves instead of over the hills. Like I said earlier, the way to accomplish this would be adding additional information to each node that's only used during pathfinding. Each time it does pathfinding, it should mark the nodes around the path. On the next use of pathfinding, those nodes will be avoided causing the bot to choose an entirely different path. The distance of deviation depends on the scale of the cost added and the radius around the path it marks. I would simply need to add a parameter to the pathfinding that says whether or not I want a shortest distance, or a safe path and/or an alternate pat. The parameter would dictate how the costs are added up for each node, resulting in different path types.

    This also easily integrates with the task priority tree for AI behaviour. Some tasks require different types of pathing; getting to the objective requires a safe and random path, while finding the path to the oddball carrier needs the fastest path since you want to minimize the time they're holding the ball.

    Update (May 28)

    This has grown in complexity so if I want to make things easier on myself for the future AI stuff, then I'll have to improve the modularity of my code. This will take some time since there's a lot of things I want to improve while I do this, so if you're reading this then don't expect any updates for a while.

    Update (June 10)
    The most apparent change is the renaming of HaloBot to GuiltySpark. GS now has an icon as well as some practical features, such as click and drag viewing of the graph (left button panning, right button angle), some some adjustment to the console commands, and revised management of threads and memory reading. Everything's falling into place for the AI.
    Last edited by Con; June 10th, 2010 at 02:13 AM.
    Reply With Quote

  10. #80
    chilango Con's Avatar
    Join Date
    Aug 2006
    Location
    Victoria, BC, Canada
    Posts
    8,397

    Re: [WIP] GuiltySpark (formerly HaloBot)



    bump

    I made a little video of the program in action. It shows you building and editing graphs, as well as using the pathfinding with some real server lulz. I know the quality is horrible, whatever.
    I also saw texrat when I was recording. Who knew he was still around?

    This video is unable to be displayed because the YouTube video tags were used incorrectly. Please review proper use of the tags here.

    the updated UI so you can better see what I'm clicking, etc:
    Last edited by Con; June 11th, 2010 at 07:45 PM.
    Reply With Quote

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •