Page 3 of 5 FirstFirst 1 2 3 4 5 LastLast
Results 21 to 30 of 41

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

  1. #21
    Basic Member
    Join Date
    Jan 2012
    Posts
    41
    For replay downloading:
    You can get the replay salt from the Opendota API - https://docs.opendota.com/#tag/replays
    With this you should be able to get pretty much any public match in ~ the last 2 weeks

  2. #22
    Basic Member axetion's Avatar
    Join Date
    Jan 2017
    Posts
    26
    I actually used Opendota to get some replays but the problem is that downloading replays is ratelimited by Valve.

  3. #23
    ^ add to that there is a 500 limit per IP address, even if you have multiple steams.

    This may be something I havent seen in the training lua. dont understand it properly yet.

    but you're taking current items as inputs, you're assigning them an integer.

    wont the neural net try and assign some relative meaning to their ids.

    example:
    iron branch id : 80
    sheepstick id : 79
    bottle id: 3

    the net will think 'Sheepstick is much more similar to iron branch, than it is to bottle', because it has a closer id. Which is nonsense.

    is this already handled?

    if its not, I 'believe' the correct thing to do is to transform items into binary-inputs. so rather than 6 fields (one for each current item).
    You would need ~100 fields. [HasBranch, HasGhostScepter, HasBlademail] ...etc. although as can have multiples maybe it needs to be [NumBranches, NumBlademails, NumNullTalismans....]


    If I'm correct (unsure), this is an example of how the number of features/inputs is going to explode upwards as it gets 'cleverer'.

    It's kind of funny that neural nets claim to mirror how humans think/learn. But I think dota is complex enough, its an interesting example of how
    humans will essentially 'learn' whilst ignoring most of the features, then over time they essentially add more and more features/inputs to their mental model of the game to make decisions on, as they understand the game better.

    Jamming literally every input into a neural-net before doing any training, doesnt match how people learn dota.
    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. #24
    also just to note. im on ubuntu

    even with it installed needed to give ZLIB_LIBDIR instructions to luarocks, otherwise it couldnt find it itself. not sure if both variables are necessary or just one.
    Code:
    luarocks install pegasus ZLIB_DIR=/usr ZLIB_LIBDIR=/usr/lib/x86_64-linux-gnu
    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

  5. #25
    Im going to put all my questions here rather than pm or something in-case others have same.

    from trainer.lua

    CreateContainer is defined with only 3 parameters, however called like this. Is the 3 just a leftover from hardcoding stuff?
    Code:
    local move = CreateContainer(input_len, output_len, math.floor((input_len + output_len) / 2), 3)
    If Im understanding correctly, have 3 hidden layers, each one have (inputs + outputs)/ 2 number of nodes.
    I always struggle to know how people choose net structure. Is there reason behind current setup, or just something to get project working and testing?

    I think you just forgot lua 1-indexing here `move_label_weights[i + 1] = (label[0] or label[1]) / move_total` I believe you are trying to index label, rather than search for an integer key
    Last edited by TheP1anoDentist; 06-03-2017 at 06:18 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

  6. #26
    So I find it hard to understand exactly what the trainer is doing. It is hard to keep track of what data is what, because it is a bit dependent on knowing which index is which.

    what are your thoughts on having the golang write to file a more structured file. i.e json.

    that would let you do results = [{"inputs": {"items": [1, 3, 4], "positions": []}, "outputs": []}]

    then your trainer unpacks this into raw arrays for torch.
    you obviously still have to deal with raw arrays at some point, but I think converting data to them as late as possible makes adding new inputs/outputs easier.

    label weights is just the matrix of weights connecting all the nodes between input/hidden/output layers right?
    but I dont know what class_weights are. dont think ive ever used them before. Ive never had multiple outputs, do they become important then. if so can you explain their function here?

    A small mspaint style diagram of the net structure would probably be quite helpful

    training_err is the error the network claims it has. but you've split your data into training data and test data, and the validation_err describes how much trained model differs from test data?

    edit: are items inputs or outputs?
    Last edited by TheP1anoDentist; 06-03-2017 at 07:43 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

  7. #27
    Basic Member axetion's Avatar
    Join Date
    Jan 2017
    Posts
    26
    Quote Originally Posted by TheP1anoDentist View Post
    if its not I 'believe' the correct thing to do is to transform items into binary-inputs. so rather than 6 fields (one for each current item).
    You would need ~100 fields. [HasBranch, HasGhostScepter, HasBlademail] ...etc. although as can have multiples maybe it needs to be [NumBranches, NumBlademails, NumNullTalismans....]
    .
    Yes, this is how it works (one-to-many). The reason why the corpus builder outputs the IDs (which are essentially the indexes you set to 1) is because at the time it doesn't know how many items there are so it has no idea how many fields to put. Instead the trainer preprocesses this for it when loading the examples.

    Quote Originally Posted by TheP1anoDentist View Post
    I think you just forgot lua 1-indexing here `move_label_weights[i + 1] = (label[0] or label[1]) / move_total` I believe you are trying to index label, rather than search for an integer key
    `label` is not an array, it's a map mapping classes to the number of times that class occurred. Depending on the class the "ignored/none" class may either be `0` or `1`.


    The trainer used to have more comments and was a lot cleaner, but in the past couple days I've really changed how it works so now it's kind of nasty. I will clean it up and add more comments explaining all of this (especially in ParseMoveBatch).
    Last edited by axetion; 06-03-2017 at 08:14 AM.

  8. #28
    Basic Member axetion's Avatar
    Join Date
    Jan 2017
    Posts
    26
    Quote Originally Posted by TheP1anoDentist View Post
    training_err is the error the network claims it has. but you've split your data into training data and test data, and the validation_err describes how much trained model differs from test data?
    In essence. The training loss is used to drive the actual changes the network makes, while the validation error is used to make sure that the network isn't overfitting the training data by having a set of data the network never looks at when optimizing.

    Quote Originally Posted by TheP1anoDentist View Post
    edit: are items inputs or outputs?
    Inputs are items, outputs are *active* items (items that the corpus builder has observed being used)

  9. #29
    Basic Member axetion's Avatar
    Join Date
    Jan 2017
    Posts
    26
    Quote Originally Posted by TheP1anoDentist View Post
    CreateContainer is defined with only 3 parameters, however called like this. Is the 3 just a leftover from hardcoding stuff?
    Code:
    local move = CreateContainer(input_len, output_len, math.floor((input_len + output_len) / 2), 3)
    Good catch. Thank you.

  10. #30
    Basic Member axetion's Avatar
    Join Date
    Jan 2017
    Posts
    26
    Quote Originally Posted by TheP1anoDentist View Post

    It's kind of funny that neural nets claim to mirror how humans think/learn. But I think dota is complex enough, its an interesting example of how
    humans will essentially 'learn' whilst ignoring most of the features, then over time they essentially add more and more features/inputs to their mental model of the game to make decisions on, as they understand the game better.
    This is something that neural networks can do too, with feature selection There aren't a lot of good fast algorithms for it though....

Posting Permissions

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