Page 4 of 5 FirstFirst ... 2 3 4 5 LastLast
Results 31 to 40 of 47

Thread: dota2_nn: Extremely WIP deep supervised learning full-takeover bots

  1. #31
    Basic Member axetion's Avatar
    Join Date
    Jan 2017
    Posts
    40
    Improving the readability of the examples is something I'd like to do but not sure how much of a priority it should be. In the mean time you can find out what the item IDs are by doing this in a REPL:

    Code:
    require "ability_data"
    ability_data.items.npc_dota_hero_whatever[<team>][<id>]
    ability_data houses all the IDs used in classification (abilities, items, active abilities and active items)

  2. #32
    Basic Member axetion's Avatar
    Join Date
    Jan 2017
    Posts
    40
    Quote Originally Posted by Platinum_dota2 View Post
    The reason I was saying this is because either you will have to use a huge feature vector to cover the things that the algorithm should consider, in which case the learning process becomes impractically long, or you have to use a small one in which case the end results won't be good. .
    I agree with what you're saying, but I went into this knowing full well the former is what would probably end up happening. I don't consider the current features I'm using complete by any stretch, and I'm willing to sink long periods of compute time into getting good models. So we'll see how it pans out

    FWIW the bot is already something of a hybrid. Things like managing the courier and basic laning are too micro for the neural network to bother with.

  3. #33
    thanks for all the answers so far. I've learnt an awful lot today
    I think im finally starting to understand how it works now

    the 'target' also gets unrolled into 0-1 probabilities for each target type in the output vector. same for ability and item

    so AbilityUsed is a LABEL.... Shuriken Toss..or whatever its integer equivalent is, is the CLASS

    I'm still not sure what move_class_weights and move_label_weights are doing.
    are these weights the same type of weights that live in the hidden layers
    do they get updated during backpropagation like normal-weights when loss is called?

    or are they an extra layer you've added...between final hidden and output...after output? to handle it being multi-label, multi-class model.

    or are they just the final hidden layer, but you have essentially overridden the default randomizing of weights, with values based on how frequent those classes appear. leading to faster learning?

    basically I have no idea what nodes these weights are actually connections between

    in your actual bot part you might have some actual accidental index 0-ing unit:GetNearbyNeutralCreeps(1600)[0], unit:GetNearbyHeroes(1600, true)[0] etc
    https://github.com/ThePianoDentist/t...dentistdotabot Lina bot which pulls small camp when 'laning' (Aim to work on pulling and stacking bots initially)
    https://github.com/ThePianoDentist/dotabots-ml-tools Parsing data from bot games

  4. #34
    Basic Member axetion's Avatar
    Join Date
    Jan 2017
    Posts
    40
    Quote Originally Posted by TheP1anoDentist View Post
    I'm still not sure what move_class_weights and move_label_weights are doing.
    are these weights the same type of weights that live in the hidden layers
    do they get updated during backpropagation like normal-weights when loss is called?
    No, they're not part of the network and they don't change. In essence, they're supposed to weight the loss function so that less-common classes (or labels even) matter more. Otherwise the network would always output the most common class to "minimize" the error.
    Last edited by axetion; 06-03-2017 at 11:18 AM.

  5. #35
    Basic Member axetion's Avatar
    Join Date
    Jan 2017
    Posts
    40
    Quote Originally Posted by TheP1anoDentist View Post
    in your actual bot part you might have some actual accidental index 0-ing unit:GetNearbyNeutralCreeps(1600)[0], unit:GetNearbyHeroes(1600, true)[0] etc
    Thanks. I can't seem to get used to that (annoyed me when I first learned Octave too)...

  6. #36
    Quote Originally Posted by axetion View Post
    Thanks. I can't seem to get used to that (annoyed me when I first learned Octave too)...
    I only notice it because I use intellij IDE with lua plugins, which flag things like that up for me. I highly recommend

    do you have any tips on doing dimensional analysis on tables in lua?
    I print out #table, #table[1], #table[1][1] until I get an index error, but it feels really clunky and there should be a better way.
    https://github.com/ThePianoDentist/t...dentistdotabot Lina bot which pulls small camp when 'laning' (Aim to work on pulling and stacking bots initially)
    https://github.com/ThePianoDentist/dotabots-ml-tools Parsing data from bot games

  7. #37
    Basic Member axetion's Avatar
    Join Date
    Jan 2017
    Posts
    40
    Quote Originally Posted by TheP1anoDentist View Post
    do you have any tips on doing dimensional analysis on tables in lua?
    I print out #table, #table[1], #table[1][1] until I get an index error, but it feels really clunky and there should be a better way.
    I doubt pure Lua has anything better (Lua is notoriously minimalist). But one of the reasons I love Torch's tensors is that they make it really easy to manage multi-dimensional data. If you have a tensor all you have to do is:

    Code:
    tensor:size()
    and it returns a 1D tensor containing the sizes like so:

    Code:
    th> tensor
     1  2  3
     4  5  6
    [torch.DoubleTensor of size 2x3]
    
                                                                          [0.0001s]
    th> tensor:size()
     2
     3
    [torch.LongStorage of size 2]
    
                                                                          [0.0002s]
    th>
    You can also do :size(<num>) to get a specific dimension.

    Quote Originally Posted by TheP1anoDentist View Post
    I only notice it because I use intellij IDE with lua plugins, which flag things like that up for me. I highly recommend
    Hm. I currently use VS Code, but the Lua extension only really checks syntax.
    Last edited by axetion; 06-04-2017 at 09:23 AM.

  8. #38
    Basic Member axetion's Avatar
    Join Date
    Jan 2017
    Posts
    40
    Been a little distracted by the Battle Pass, but here's a small status update for those who are interested:

    I've switched the server from Pegasus to Waffle, which is cleaner and doesn't need zlib (should simplify install quite a bit)

    I've also been experimenting with getting Travis to build binaries of everything automatically (I started with the trainer since it has less dependencies), but it doesn't quite work yet. Once it does however you can simply download a binary package for your platform from here: https://github.com/axetion/dota2_nn_trainer/releases

  9. #39
    for your positions where did you get -8288.0 -> 8288.0 from for X, Y?

    I thought it was -8192 -> +8192 as I thought there were 128 grid cells and each cell was length 128 coords.

    so 128x128 = 16384

    also from this function in open-dota, and from checking m_cellX, m_cellY stuff.
    I have a funny feeling that minimum m_cellX for the map is 64, and maximum is 192. (same for y)
    Not sure if you need to take that into account? (can probably check by seeing if get a float32(cellX)*CELL_SIZE > 2*Max_X)

    export const gameCoordToUV = (x, y) => ({
    x: Number(x) - 64,
    y: 127 - (Number(y) - 64),
    });


    it's just really confusing in general and there's basically 0 proper documentation on it


    edit: someone just linked me this which might be helpful http://devilesk.com/blog/creating-a-dota-map-image
    Last edited by TheP1anoDentist; 06-25-2017 at 04:42 AM.
    https://github.com/ThePianoDentist/t...dentistdotabot Lina bot which pulls small camp when 'laning' (Aim to work on pulling and stacking bots initially)
    https://github.com/ThePianoDentist/dotabots-ml-tools Parsing data from bot games

  10. #40
    Basic Member axetion's Avatar
    Join Date
    Jan 2017
    Posts
    40
    Last I checked -8288 -> 8288 was what GetWorldBounds() returned. That might have changed.

Posting Permissions

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