Search results

  1. cakyrespa

    Algebra in ASH?

    Awesome, then I'll use: ^([\+\-\*/\^]|m(ax|in)|if|not|sqrt)$ With the next release. I keep forgetting about ordering, though I really should know better at this point in the game. So, I'm curious about performance. How fast is this in general? Like going through 10,000 iterations? I was also...
  2. cakyrespa

    Algebra in ASH?

    True, but then would it be better to use something like? ^([-\\+\\*\\/\\^]|m(ax|in)|if|not|sqrt)$ EDIT: Actually ^(?:[-\\+\\*\\/\\^]|m(?:ax|in)|if|not|sqrt)$ might be slightly better for using non-capture groups which we don't use in the code. I think that is the syntax, been a while. It uses...
  3. cakyrespa

    Ascend.ash: hands-off ascension script

    I'm a heavy commentor in my own code. I think I run about 3 lines of code for every line of comments. Mainly because I never remember where I am plus I still think the world is set at 80 columns. :)
  4. cakyrespa

    Algebra in ASH?

    That is great. I probably won't make the "...|m(ax|in)|.." change though. Yeah, it might save some time, but I think at that point, given the compiled pattern, it would be shaving off maybe a few nanoseconds off the entire thing. :) I am planning on adding sqrt() though, I need that for my...
  5. cakyrespa

    Algebra in ASH?

    You helped. That and it takes nothing to update credits. I looked at that briefly, but couldn't figure out how to create a matcher that didn't take the input string as part of the constructor. That wouldn't work but I couldn't find something that basically did "create_matcher(string): pattern"...
  6. cakyrespa

    Any script requests?

    The reason I'm using them as data files is because not all the data seems to be accessible from inside ASH, but also because I want to be able to make calculations based on unbuffered or theoretical stats (since AFAIK maximize doesn't do formulas like "ml, moxie > ml + 197, mus > ml + 187")...
  7. cakyrespa

    Algebra in ASH?

    Right now, it only handles finding the best "naked" location for adventuring for the most part. I think I got most (say 70%) of the noncombats parsed for formulas but it makes some bad decisions on the best noncombat choice to pick; I think I need to write a custom location-based script for...
  8. cakyrespa

    Any script requests?

    If you want a semi-silly way of dealing with it, there is my custom combat script (I haven't really cleaned it up). It handles most of the physical resistant and high hit point creatures, but mostly uses things I have available in my adventures (divine favors), but I has some support for other...
  9. cakyrespa

    Algebra in ASH?

    That's cool. I never delved into the depths of Java's regex operations. I'm more of a C# person. But, it looks like the rpn.ash script is okay with find() at this point, and it is anchored at both ends. Attached is the rolled up version of RPN which includes a few cleanups by the_great_cow_guru...
  10. cakyrespa

    ZLib -- Zarqon's useful function library

    I know you don't want to add this, but I wish you would reconsider. Just as you think it is trivial for me, or someone else, to edit the files, I think it would be trivial to add a few lines to make it optional but default to use user_confirm(). The difference is, your trivial change shows up in...
  11. cakyrespa

    Algebra in ASH?

    Bah, can't test the changes tonight. Oh well, I really should be going to bed myself. That whole "work" thing. I think I integrated all of the changes tonight into my version, but I can't really test it so I won't post it until tomorrow. http://svn.mfgames.com/KoLmafia/rpn/ If you want to see...
  12. cakyrespa

    Algebra in ASH?

    I think having eval_rpn() is good where it is. It basically is the entire point of the RPN library. Also, it minimizes the number of libraries to import since I'm already using it in two of my libraries. I haven't tracked the recent changes, but I have the ones from earlier this evening thrown...
  13. cakyrespa

    CanAdv -- check whether you can adventure at a given location

    I think in code. :) Do you really need to count the sonars? If prep is false, I would expect it to return true if the area is already open and false if it is not. Yeah, it isn't as useful for the obvious reasons, but I would expect semi-automated approaches to open it there (!canadv(beanbat) &&...
  14. cakyrespa

    Speaking of your latest comment. Do you want me to treat rpn.ash as a formal "project" here and...

    Speaking of your latest comment. Do you want me to treat rpn.ash as a formal "project" here and give it a dedicated forum thread like zlib? If yes, I'll ask the moderators to move the current one, if possible, or create a new one. And then use zlib to do version checking, etc. Opinions?
  15. cakyrespa

    Algebra in ASH?

    Slightly modified version. I also renamed it to rpn.ash since that seemed a bit more accurate than algebra. I added the following: * Included zlib.ash because I'm using min and max and I'm lazy. * Added the "^" to do powers (X Y ^) * Added the "min" and "max" operators (though, I really meant...
  16. cakyrespa

    Algebra in ASH?

    That's awesome. :) I thought about RPN, but I forgot how easy it was to implement one.
  17. cakyrespa

    Algebra in ASH?

    Sure, and there are probably better ways of thinking about it. The original idea I had was for the level up script I'm messing with (because it is fun). Figuring out expected stat gain from a combat is fairly trivial and I already got that done. I'm working on non-combats now. I want to be able...
  18. cakyrespa

    CanAdv -- check whether you can adventure at a given location

    I think that is what the `prep` flag is suppose to do. At least, that's the assumption I was making when I posted the modifications a few posts back. Mainly because my level-up script ends up hitting can_adv() fairly often just to figure out what places are viable choices.
  19. cakyrespa

    Algebra in ASH?

    While messing with some ideas, I encountered something I couldn't figure out how to do from an ASH script. In general, I would like to be able to take an arbitrary string, such as "2 * 10" and have it calculate the results. That is a simplification. In general, I'd like to be able to take...
  20. cakyrespa

    CanAdv -- check whether you can adventure at a given location

    Just a few more minor things dealing with "prep". boolean checkguild(boolean prep) { // guild quest-unlocking if (prep) cli_execute("guild"); item my_lew() { switch (my_class()) { case $class[seal clubber]: return $item[hammer of smiting]...
Back
Top