Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
Keeping distance
Results 1 to 7 of 7

Thread: Keeping distance

  1. #1
    Junior Member
    Join Date
    Mar 2012
    Posts
    14

    Keeping distance

    Hello.

    I've run into a problem that I haven't been able to solve yet. I have a working A* algorithm and most things are working very well, but my current goal is to implement a decently good algorithm that is able to keep distance, and I really can't think of any great way to do this by only reading the tiles that I can see on the screen.

    I tried giving every tile a heuristic based on how far away it was from the monsters on screen, and then in between every step having it run the A* to find the path to the tile furthest away that's reachable, but it didn't work as well as I had hoped it would as 10% of the time it just gets stuck walking back and forward between two tiles (which makes sense when thinking about it, as the furthest tile away can change easily after only one step).

    So I'd be really happy if someone could give me some pointers to how this can be done. I've been thinking about using vectors and having the character run in the opposite direction of the monsters, and trying another direction if it's not possible to run x tiles in the ideal one, but I can't think of any good way to implement this.

  2. #2
    Make the goal-state be (distanceFromTarget == desiredDistance) your heuristic should be a value that is determined by:

    1. The distanceFromTarget from the node being evaluated
    2. The amount of creatures within desiredDistance (or desiredDistance * 2, or desiredDistance * 1.5, play with it) of the node begin evaluated
    3. The slope between the node being evaluated and the target (1 is a perfect diagonal, desiredDistance is a straight line)
    4. The amount of non-blocking tiles surronding the node being evaluated

    The trickiest part is finding a good balance between these factors for your heuristic. If its right, though, the very loosely-defined goal-state works out well and the evasion looks pretty natural. I use this method in XenoBot, except my heuristic is a trained neural network based on those four features plus four others. If you want to go the NN route, the best way to train is by parsing movements from TibiaCast recordings of players making good evasion decisions and bad ones, and weight them accordingly, then train and give some feedback. Takes a few hours to get it right.

  3. #3
    Junior Member
    Join Date
    Mar 2012
    Posts
    14
    Thanks! That makes a lot of sense, the NN part is a bit over my head at the moment, but I might do some reading about it later on if I get the first part to work.

    How many tiles around each node do you go through when counting non-blocking tiles? Only the 8 in the first row, or more? Also, how much difference does the NN make? Is it good enough without it, or is it necessary? And do you have any resources about NNs that you can recommend?

    I have to say that I'm really impressed you've taken your keep distance-algorithm that far.
    Last edited by chi3; 04-02-2015 at 12:37 AM.

  4. #4
    Only the 8 tiles surrounding it will suffice, since each of those will be opened as nodes and check as well. The NN helps in terms of balancing out the feature set so no particular feature has an effect on the decision that is either too strong or too weak.

    http://pages.cs.wisc.edu/~bolo/shipy...ral/local.html
    http://programmers.stackexchange.com...n-simple-words

    If you want a very easy NN to play with, you can grab brain.js for nodejs. It's easy to tweak and play with since it's JavaScript, and you can write a quick parser/lexer/re-compiler to convert the final JS function generated from a trained net into whatever language you choose.

  5. #5
    Senior Member
    Join Date
    Feb 2024
    Location
    SLOT GACOR
    Posts
    660

    Updated Product Site

    Please try Google before asking about Top Product Info 289dedb

  6. #6
    Senior Member
    Join Date
    Feb 2024
    Location
    SLOT GACOR
    Posts
    660

    Best Peptide Website

    In reply to the man talking about semaglutide weight loss benefits, tirzepatide weight loss, ipamorelin hgh, bpc 157 how long, ipamorelin and bpc 157, cost semaglutide, ipamorelin buy online, mot c, tirzepatide compounded, semaglutide aging, I highly recommend this useful peptide calculator blog or tirzepatide administration, peptides gh, polypeptide drugs, peptides for growth hormone release, benefits of bpc 157, tirzepatide compound, semaglutide peptide buy online, semaglutide peptide, semaglutide online, order semaglutide online, alongside all this what google did to me about prime peptides semaglutide link not to mention bpc 157 immune system, semaglutide benefits, tirzepatide compounded, tirzepatide glp 1, cheap bpc 157, glp one, bpc peptide, glp1 peptides, semaglutide weekly weight loss, bpc 157 calculator, alongside all this read more for prime peptides semaglutide blog which is also great. Also, have a look at this his explanation on peptide calculator site alongside all glp1 drugs, order bpc 157, peptides semaglutide, semaglutide weekly weight loss, bpc 157 information, popular peptides, peptides for performance, purchase semaglutide, bpc medication, best place to buy peptides online, on top of this high rated peptide calculator forum with ipamorelin weight loss, buy tirzepatide peptide online, semaglutide weight loss, tirzepatide for weight loss, bpc 157 how to take, semaglutide peptide benefits, buy bpc 157, mot c, peptides for healing, bpc 157 hair loss, for good measure. Check more @ Updated CuanSlot88 Blog 7e1c48f

  7. #7
    Senior Member
    Join Date
    Feb 2024
    Location
    SLOT GACOR
    Posts
    660

    Top Rated UGSLOT Blog

    In reply to the man asking about sweet bonanza link, slot rtp live pragmatic play, login slot online, pragmatic play daftar, slot game website, cuan88 slot online login, slot yg hoki, rtp live slot88, rtp pragmatic online, slot streaming, I highly suggest this website for UGSLOT forum or pragmatic play live rtp, slot online gates of olympus, slot 88 bonanza, cuan88 slot online, promo slot game, pragmatic play live, nama game online slot, slot rtp live, slot pragmatic play, pg soft online, as well as this clicking here on UGSLOT forum alongside all bonanza online slot, link sweet bonanza, starlight princes, sweet bonanza indonesia, software slot, slot dan rtp, slot gameplay, online slot indonesia, pragmatic slot, slot88 pragmatic, not to mention this additional hints on SLOT88 forum which is also great. Also, have a look at this link about SLOT GACOR link not to mention game yang online, live pragmatic slot, pragmatic slot88, link pg soft, sweet bonanza indonesia, win indonesia slot, game play slot, gates of olympus indonesia, group slot online, rtp indonesia, not to mention this breaking news on SLOT88 site with apa itu play game, play cuan, slot online live, slot88 pragmatic play, pragmatic play indonesia, rtp live pragmatic, gates of olympus indonesia, play pragmatic, pragmatic slot win, slot pragmatic, for good measure. Check more @ High Rated UGSLOT Info e1c48f6

Tags for this Thread

Posting Permissions

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