• Visit Rebornbuddy
  • [Lisbeth] Your own personal crafter!

    Discussion in 'Archives' started by Neverdyne, Feb 12, 2015.

    Thread Status:
    Not open for further replies.
    1. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      Not yet, it's the version I'm working on right now.
       
    2. wilderg99

      wilderg99 New Member

      Joined:
      May 31, 2014
      Messages:
      245
      Likes Received:
      0
      Trophy Points:
      0
      man i cant wait! lisbeth is awesome and i cant wait to see the new one!
       
    3. ephiron

      ephiron New Member

      Joined:
      Mar 1, 2012
      Messages:
      29
      Likes Received:
      0
      Trophy Points:
      0
      Having an issue crafting multiple items. It will craft the first item, crafting all the necessary sub items correctly. When it moves to the next item, it states:

      [09:13:17.848 N] [Synthesize] We don't have enough Normal Quality Aldgoat Leather (5277) (or whatever it is) in our inventory

      and won't craft the sub items again to create the next item.

      I have all of the required items for all of the crafts (thank you fyi, the bot compiles a missing item list which is useful). have been crafting one item, then deleting that item from orders.

      Attached is log and orders.
      View attachment 14792 2015-03-25 01.01.txt
      View attachment orders.txt
       
    4. sibs

      sibs New Member

      Joined:
      Oct 28, 2012
      Messages:
      26
      Likes Received:
      0
      Trophy Points:
      0
      What sort of algorithm/heuristic are you using for the new version?
       
    5. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      It uses an internal crafting simulator to expand a crafting tree, where each node is a resulting state from using a specific skill on the previous node. The tree is huge so it cannot be searched exhaustively to find the ideal sequence of skills, but by using a divide and conquer approach that separates the entire sequence into stages, each with different goals and limits, it can search for smaller sequences that are optimal for each individual stage. It also uses some very aggressive pruning techniques to reduce the size of the tree.

      Right now I have the simulator made, and two of the three stages are being tested. The remaining stage, which is where inner quiet stacks are increased, is the longest step wise so it's got me a little nervous to see if it'll be searchable through a simple depth first with pruning or not. If it's still too big for that, I might end up resorting to simple Hasty Touch - Mend cycles with logic for different conditions.

      So the idea is to search for the ideal sequence of skills to optimize the quality of the craft and guarantee its completion. The cool thing about it is that it has no hard coded skill usage aside from a very small part on the finisher stage (which is constructed differently if you have Byregot or not). This means it can work with any combination of skills you might have, from level 1 with no cross skills to level 50 with all of them, and still tries to achieve the best result.
       
      Last edited: Mar 25, 2015
    6. Naus

      Naus Member

      Joined:
      Feb 20, 2015
      Messages:
      99
      Likes Received:
      8
      Trophy Points:
      8
      I just updated Agil, and everything works fine now. Thanks!
       
    7. sibs

      sibs New Member

      Joined:
      Oct 28, 2012
      Messages:
      26
      Likes Received:
      0
      Trophy Points:
      0
      cool cool, I have a standalone crafting bot coded for a while now, my strategy is slightly different from yours, I broke the problem into 3:

      1) A deterministic tree search to see if we can finish the craft. (minimax, somewhat similar to what you're doing I think)
      2) A deterministic quality search ,the bot finds 15 step solutions to crafts instantly!
      3) A rule based system to take risks.

      The only flaw my bot has is estimating long terms probalistic gains, but this is almost a non-issue unless you're doing those 8k quality items, the bot is pretty much better than humans hehe.

      I'm just lazy to port it to RB.

      I'd really like to see your simulator model, my model is decent, but level penalties and ingenuity1/2 effect on lower level items could be improved.
       
      Last edited: Mar 25, 2015
    8. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      That sounds very interesting indeed. For the simulator model, I got the quality / progress formulas from another simulator I found somewhere that seemed to produce values close to reality. From the tests I made, they provided good predictions but am not 100% certain it'll hold for every recipe level difference. The simulator itself I ended up writing it from scratch as a separate project so it doesn't depend on RB's libraries. So far I've tested each skill in unit tests and they seem fine, but we'll see once sequences are run.

      I'm really curious to know how you'd handle the randomness from Tricks of the Trade. Right now what I ended up doing was separating the three stages as so:

      3. Finisher Stage - Calculates a small sequence of steps based on known skills to make the biggest Byregot. Only considers things like Great Strides that buff it, while allowing for 1 to 2 synth skills max. The result is something like Steady Hand->Great Strides->Innovation->ING2->Byregot's->CSII->CSII depending on the skills the player has. The synth skills here are to take advantage of the Ingenuity buff. If the player doesn' thave Byregot then the finisher is simplified to only a single synth skill with 100% success chance.

      1. Progress Stage - Only cares about increasing progress, with the goal to leave it at a point where the finisher stage's progress completes the craft.

      2. Quality Stage - Starts with the resulting node of the progress stage and finds the sequence to maximize quality while leaving the needed resources for the finisher stage.

      Then it strings each stage as Progress - Quality - Finisher, generating the complete sequence. The problem is how to treat Tricks. Right now how it works is by reacting to it, instead of messing with probability. It interfaces with Rebornbuddy by telling it what skill to use next each tick. Then after using it, if a Tricks can be used next, it is given preference depending on conditional rules and in what stage it is, after which the remaining sequence for that stage is recalculated with the new CP gain taken into account on the root node. The finisher stage is calculated only once and never changes, but will give preference to Byregot during its sequence based on rules regarding excellent condition. The other stages are recalculated whenever a tricks happens.

      I'm also very curious on what the risk taking rules you use are :p But yeah the Quality / Progress formulas are my main concern, if they aren't good nothing is good. Friggin Square should tell us how it's calculated. The ones I'm using resemble the ones here, which are based on some reddit posts. But the simulator here seems to produce values closer to reality. Sadly he doesn't tell what formulas he's using :(
       
      Last edited: Mar 25, 2015
    9. wilderg99

      wilderg99 New Member

      Joined:
      May 31, 2014
      Messages:
      245
      Likes Received:
      0
      Trophy Points:
      0
      would it be possible to add Desynth to Lisbeth?
       
    10. kagepande

      kagepande Community Developer

      Joined:
      Oct 20, 2014
      Messages:
      289
      Likes Received:
      11
      Trophy Points:
      18
      Theres currently no API to handle Desynth.
       
    11. sibs

      sibs New Member

      Joined:
      Oct 28, 2012
      Messages:
      26
      Likes Received:
      0
      Trophy Points:
      0
      yea I gave Lokyst a hand with those formulas, I found some better ones though, the quality one is specially good:

      increase = (35 + 0.35 * ctrl + 0.000035 * ctrl * ctrl) * qualityModifier * conditionModifier;

      The progress one is pretty good too, after all it's linear, but the issue is off by 1 errors here are actually unacceptable you may break items :(, so a really precise model is needed.... I have an idea to get a better progress formula but haven't gotten around to it, now the level penalty/bonuses on progress I have no clue on the model, I'm almost using hard coded values, since it makes no sense.

      The risk taking part of my algorithm only does what will net you the best "expected return" , hasty touching over other touches, tricksing nearly every good, tricksing once per WasteNot1, comfort zoning when dur + cp > some treshhold , this includes using PbP when it's super worth it before SH1, and using rapid synthesis , it never finishes a craft though, it uses the minimax progress algorithm to see if we can keep going, while saving at least gs+inno+byregot's for finisher... I still need to make a logic to see if we can get "some" progress done before starting increase quality, to lighten the load on the deterministic quality search.

      The deterministic solution only consider initial rolls on condition's otherwise the combinatorial explosion will make your program take forever to compute, even then it still takes forever if you don't do a few of optimizations....
       
    12. hkme

      hkme Member

      Joined:
      May 12, 2014
      Messages:
      197
      Likes Received:
      0
      Trophy Points:
      16
      Can i specify the HQMats of the NeoProfiles.Tags.Synthesize in the Order?
      Currently Lisbeth only look at UseHqMatsFirst in Settings and either set all to -1 or all to -2

      for example, Order.yaml
      Code:
      - Name: Bronze Ingot
        Amount: 1
        Strategy: Black Lotus
        HQMats: [1, -1]
      will use 1 HQ from first material (Copper Ore) and since it require 2 Copper ore that mean 1HQ 1NQ
      and prefer HQ in second material (Tin Ore) and use NQ when no HQ

      This way I feel more flexible with the crafting plan
       
      Last edited: Mar 25, 2015
    13. ephiron

      ephiron New Member

      Joined:
      Mar 1, 2012
      Messages:
      29
      Likes Received:
      0
      Trophy Points:
      0

      Any idea on this? Also tried using the LisbethHelper plugin to create the order, but still having the same issue of only creating one item in the series.
       
    14. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      Well, the order doesn't have Fingerless Goatskin Gloves. Are you sure that's the one? Are they a component for something else?
       
    15. ephiron

      ephiron New Member

      Joined:
      Mar 1, 2012
      Messages:
      29
      Likes Received:
      0
      Trophy Points:
      0
      Thats because it finished that craft, and I just deleted it so it wouldn't craft it over again when I press start again. Say I have 10 items, it crafts item 1 (and the sub items) and then stops. So I delete #1 and now its 9 items and only crafts #1 again.
       
    16. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      Hmm, that's really weird. Can you see in the window if when that happens the correct material amounts are set right before the error happens? When the error happens, is that a component for the next order? Or is it the order item itself?
       
    17. ephiron

      ephiron New Member

      Joined:
      Mar 1, 2012
      Messages:
      29
      Likes Received:
      0
      Trophy Points:
      0
      No, none of the materials get set.

      It is a component for the next order that is causing the hang up.

      Another weird thing happened. I got to an item that I had an abundance of materials for, and it crafted the same item 3 times until it ran out of materials, then stopped, stating that it didn't have enough materials to craft it. The next item on the list had the available materials (without needing to craft any of them), but it didn't move onto it.

      When I put an order to just create individual materials (leather, glue) it worked in sequence fine, switching to different classes and everything.

      Attached another log and order

      View attachment 13912 2015-03-25 16.05 [start at line 1116].txt
      View attachment Orders.txt
       
    18. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      644
      Likes Received:
      18
      Trophy Points:
      18
      Try to do it without Starry Night Miter, that might be causing it. If you specify a strategy, then all components for that order will use that strategy. That might be causing failures to complete components.
       
    19. ephiron

      ephiron New Member

      Joined:
      Mar 1, 2012
      Messages:
      29
      Likes Received:
      0
      Trophy Points:
      0
      I just noticed that it is actually the component for the same item(gear), not the next item(gear) which kinda explains why it crafted the same item 3 times in a row. Crafted a boarskin gear and the next was a raptorskin gear, but it called for boar leather again.

      Also just noticed that with one item (gear) to craft, and 1 quantity, it still tried to start the craft over by crafting the component again. Both hasty and starry did this. Did full re-install of current and previous buddy builds, fresh without any other plugins/profiles and same thing.
       
    20. ephiron

      ephiron New Member

      Joined:
      Mar 1, 2012
      Messages:
      29
      Likes Received:
      0
      Trophy Points:
      0
      Did without specifying any and still the same. Trying to craft same item over and over.
       
    Thread Status:
    Not open for further replies.

    Share This Page