Ascnesion break-down

itamaram

Member
So I was thinking, what do we need to do in order to fully ascend? (softcorely or hardcorely).

I came up with the following probably incomplete list.
I was hoping that part by part we will be able to crack the ascension secret and create an auto-ascending script when it is run consecutively.
(If this is the wrong board or forum tell me and I will be out of here...)

First we need to distinguish between 2 different cases.

1.No skill are present from previous ascensions.
2.Some skill have been P'd from previous ascensions.

Another 2 mutually exclusive cases are (for SoftCore only)

1.The proper items are stored in Hangk's.
2.You need to collect your own stuff.

I think that if we are to tackle the ascension problem, we are to consider all of those cases.

So the list of tasks is:

(A)Choosing what to eat.
(B)Choosing what to drink.
(C)Completing quests (mainly done in this forum)
(D)Determining combat stratgy (way easier with banked skills)
(E)Choosing what to equip at any given time.
(F)Deciding where to adventure when.

I have probably forgot myriad things, and I will be happy to be reminded.

Have any of the above problems have been addressed before in this forum?

Itamar
 
[quote author=itamaram link=topic=115.msg478#msg478 date=1145959904](A)Choosing what to eat.
(B)Choosing what to drink.
(C)Completing quests (mainly done in this forum)
(D)Determining combat stratgy (way easier with banked skills)
(E)Choosing what to equip at any given time.
(F)Deciding where to adventure when.[/quote]

A -- Very difficult, because there are a lot of factors involved. Do you eat what's most easily available, or do you seek out better food? Do you optimize for turns/fullness or statpoints/fullness or are you looking for some special effect (like flower power or the lihc eye pie thing)? There are definitely some scripts that have been posted here that attempt to work on parts of this problem, and I'm sure a few people have scripts that they feel are complete solutions to meet thier own personal preferences. But a general script that would work for anyone? That's going to be incredibly tough.

B -- Pretty much the same problems as A.

C -- There are pleny of scripts that solve specific quests, more in progress, plus Veracity's excellent built-into-KoLmafia stuff. I think this is the most-solved part of the puzzle.

D -- Currently, KoLmafia doesn't facilitate much customization of this. You can specify custom combat settings on a per-monster basis, but your script can't adjust these settings as it runs, as far as I know.

E -- Another difficult problem. Depends on several factors:
- What quest are we working on?
- What skills do we have?
- What do our stats look like right now?
- What monsters are we most likely to run into next?
- What is our current HP/MP?
There must be at least a dozen other factors like that, before you even start to consider things like what equipment you actually have on hand vs which equipment you might obtain elsewhere. For example, If I'm going to do the Daily Dungeon and I don't have hot/cold/spooky/stench protection, I'll take a side trip to the limeric dungeon first to grab the dungeoneer's dungarees... unless I have sauceosphere, of course. Or unless I'm short on turns. Or unless I anticipate that I *will* be short on turns later. Or unless I have a bazillion hit points and I don't care about getting hit for 60 points of cold damage when I pass the refridgerator. Or unless....

F -- Yet another difficult problem, and it interacts with all the others. For example, let's say that my current quest is to help out the l33t tr4pz0r... but I haven't eaten yet today, and I have pastamastery. I might very well decide that the best thing to do is first go hit the hippie camp to obtain some herbs for chow mein, then go do my actual quest. Of course, in order to handle the hippies I could just wear the best outfit I currently have, or I could make a side-trip to the pirates to get some swashbuckling pants for increased moxy. So now I've decided to go to the pirates to get the pants to help with the hippies to make the chow so I can go hunt some goat cheese, but maybe my turn-conservation algorithm cuts in and realizes that I'll get the swashbuckling pants a lot faster if I have less combat adventures and more non-combat adventures at the cove. So I could go to the dungeon of doom to find a ring of agrivate monster and a magic wand so I can zap it in hopes of getting a ring of conflict, or I could always go hit the orcish frat house in hopes of finding some deodorant...

This is all insanely complex stuff. I don't think that ASH is up to the task of solving these problems in a general way, and I don't think it's a good idea to try to hack ALL of this logic into KoLmafia itself. Instead, I think we need to work on lots of little scripts that are easy to understand, use, and modify. That way folks can customize to suit thier tastes, and hopefully string together a bunch of scripts in a way that minimizes the boredom they experience in the kingdom, and maximizes the fun they have. I don't think a complete play-the-game-for-you program is a realistic expectation in the short term, unless you have a very narrow set of requirements.
 

Tirian

Member
It would be interesting to have a contest where everyone sends in a mega-script and each of them is run on a character who is ascending hardcore for the first time. I imagine that the winner would take well over two months to complete without any human intervention, but as turtle races go it should be fascinating.

As far as I can see, the two most unpleasant obstacles would be CLI's inability to "read" the quest log and modify the custom combat settings. cjswimmer gets around the first problem by buying cool whips every time he passes a milestone to keep track of where he is in quests, but it should be easier than that.
 

itamaram

Member
[quote author=Bucket de Mowbray link=topic=115.msg480#msg480 date=1145986814]
Lots of insightful stuff.
[/quote]

Yes I realize that. And yet, are ascensions really all that different from each other? For my next few ascensions, I am planning on writing them out in very many details. I believe that the logs will enable me to write a decent script for my own character.

changing the script to fit any generic character might seem like a terribly difficult job, but it doesn't have to be.

I am far from the day where I can say I've wrote a super efficient bot. I am talking about writing a semi-retarded bot. One that will take 2 to 3 times as long to complete a single ascension.

I believe that our best tactic is to eliminate as much content as possible, and gradually add it back on.
The less places we send the bot, the less encounters, items and drinks we need to cope with.

For the time being, I believe the biggest challenge is the inabilty to modify your costum battle tactic via a script. But we can still write a bot and leave it open.

Again, narrowing down the possibilities, we can decide to write a class specific ascnesion script for characters with no banked skills. This will allow us mainly to cope better with skills and guild.

I will start working on my script soon. Any extra insights would be useful.

Itamar

And Tirain, you are so on.
 
[quote author=Tirian link=topic=115.msg481#msg481 date=1145988305]
It would be interesting to have a contest where everyone sends in a mega-script and each of them is run on a character who is ascending hardcore for the first time.  I imagine that the winner would take well over two months to complete without any human intervention, but as turtle races go it should be fascinating. 

As far as I can see, the two most unpleasant obstacles would be CLI's inability to "read" the quest log and modify the custom combat settings.  cjswimmer gets around the first problem by buying cool whips every time he passes a milestone to keep track of where he is in quests, but it should be easier than that.   
[/quote]

I broke the chains which cjswimmer was dealing with using cool whips here: http://kolmafia.us/index.php/topic,56.0.html Not much action has taken place after that, no-one seemed interested in this method of saving and reading data from day to day so I haven't done much more with it. The principles are there though, and a lot more can be tracked from day to day using this method.
A muscle sign that is going to do the mayor quest can use this method to track the mushroom fields. If going for the new special familiars  then the same applies. Also if doing the gourdcore trophy, then that can be tracked, and the potions used. Effectively, my methods give kolmafia the same memory that a person has only better.

If the comma thing becomes an issue, I can easily modify the batch to remove the commas while writing the script. The comma issue is posted in the kolmafia thread.
 

Nightmist

Member
~=~ The Way I Handle It ~=~
(A) What to eat? I currently already have a script that will eat whatever is in your inventory in order to max moxie and then adventure gains. The major flaw in my script is that it will not cook more advanced foods even if it can (Mainly due to mafia's lack of a scripted "Can create *item*?" check)

(B) What to drink? I currently do not have a script for this but I assume I will be basing it on my "What to eat?" script.

(C) Completing quests? This part is relatively easy in terms of "just get the quest done in the end" however once you start to consider how effective one method is to another it becomes vastly more complicated. (Such as the ore part of the trapper quest, Easy to do? Yes, Easy to do effectively?, Not quite so easy) My current script will simply only attempt a quest when the character is within a moxie level that will make the character "Always dodge".

(D)What to do in combat? This is a major question and limitation to scripting a "total ascension run". Currently in my script im just sticking to using ranged weapons and attacking normally because of the way I focus on moxie.

(E)What to equip? Currently I equip to max out moxie (Although I currently have scripts that can handle maxing out a certain stat and then if theres no equipment that will boost "x" stat, either equip by max power or by boosting another stat). My method completely ignores other enchantments and is a major flaw in my script.

(F)Where to adventure? As you have probably guessed by now, I have scripted my character to adventure to get max stat gains but still be in the "Always Avoid Attacks" area.

~=~ Random Notes ~=~
I personally use meat paste in the closet counter (Which I agree, needs to be changed since mafia pulls meat paste from closet to meat paste items together (Unless I remember to create meat-paste pre combining items))

The script runs on the basis, unless you are at a safe moxie level, dont adventure at X place.

(Of course this means it doesnt go and collect the NS items during its run but that can be "easily" implemented)

Then again Hola has specifically said that the closer we get to a effective ascension script the less he wants to work on kolmafia (Im pretty sure I read that in the KoL forums KoLMafia thread somewhere)
 
I agree with Bucket de Mowbray and Nightmist.

1) Making a usefull script for eating, drinking, and equipping items is tough to say the least. (I have pretty much given up on my script to just make the "best" rollover outfit. The choices from player to player alone make it near impossible, and then to include a check for even the most likely items is overwhelming.)

2) Hola is DEAD SET against mafia being able to run a character completely unattended. That just might change over time... But I certainly wouldn't hold my breath - nor risk the continued support of mafia over it.
 

itamaram

Member
A few days ago I've noticed that the combat script is saved as an internal file in the KolMafia folder.

Can't we use it to our adventage by using the echo/mirror command to effectively rewrite the combat script and create costum combat strategy from within an ash file?

Also, I have no intention of upsetting anyone. I just like the challenge which seems quite interesting.
 

Nightmist

Member
[quote author=itamaram link=topic=115.msg510#msg510 date=1146121418]
A few days ago I've noticed that the combat script is saved as an internal file in the KolMafia folder.

Can't we use it to our adventage by using the echo/mirror command to effectively rewrite the combat script and create costum combat strategy from within an ash file?
[/quote]

Doesnt mirror/echo just append to the file rather then overwrite?
 

Tirian

Member
Even if it did, you could echo your request to a temp file and then write a daemon (in Perl or something) that would notice the existence of that file and modify the combat commands based on it.

But I don't know what it would take to get the modified file to get imported into your session. Is logging out and back in sufficient, or do you have to totally restart KolMafia?
 
[quote author=Tirian link=topic=115.msg512#msg512 date=1146127168]
Even if it did, you could echo your request to a temp file and then write a daemon (in Perl or something) that would notice the existence of that file and modify the combat commands based on it. 
[/quote]
Ever hear of the KISS method?
8 lines in an MS-DOS batch file.

Code:
:start
@echo off
IF EXIST filename.tmp goto Makechange
goto start
:Makechange
del filename2.tmp > nul
copy filename.tmp filename2.tmp > nul
del filename.tmp > nul
goto start
To stop this batch file from running, close the ms-dos box. Before anyone says anything, yes when your computer is idle this will use 100% of your processor time. When another program needs processor time, it will be obediant, and drop down the amount of time it uses as far as 0% except when renaming and deleting files. I posted this message with the exact file below running in the background.

if you remove the echo off statement, you will see it is very very fast, but removing the echo off statement does slow it down because it writes every command to the screen.
 

Attachments

  • test.bat
    183 bytes · Views: 61

Nightmist

Member
Even with a method of editing we would need to first off run that file that edits it inside of a running script. Otherwise we have to resort to using a batch file that does.

1. Mafia gets to X point (Run a script to X point)
2. Mafia exits
3. Run file that edits the CCS
4. Re-launch mafia
--repeat--

Since we cant exactly use mafia to run a file while running a script.
 
That can be done using similar methods in a batch file. The script would not only have to write the css, but also remember where it is when it is re-ran. It can be done, but it would require importing of scripts to be written by the batch file, running kolmafia strictly in the cli, and the script would have to write a file telling the batch file wether or not to re-run kolmafia again. It's do-able, but would take a lot of planning.
 

Nightmist

Member
Correct me if im wrong but I was just trying to say that to use this method we would require to exit mafia before we can edit the CCS because mafia has no inbuilt function that would launch the CCS editing script for us.
 

Nightmist

Member
Ahhh I get it now >>, So mafia only reads from the CCS whenever it starts a battle?
(Tehehe this threads turning into a, "Rediscover the CCS" thread)
 
[quote author=Nightmist link=topic=115.msg524#msg524 date=1146146985]
Correct me if im wrong but I was just trying to say that to use this method we would require to exit mafia before we can edit the CCS because mafia has no inbuilt function that would launch the CCS editing script for us.
[/quote]

Yes, that's why I say batch file.

[quote author=Tirian link=topic=115.msg527#msg527 date=1146155755]
My reaction to your solution is not that your DOS script takes all available cycles, but that it requires that your ASH script know and maintain the entire contents of your custom combat file. That seems like a potentially very long and complicated script. By contrast, a Perl script wouldn't necessarily be much longer than eight lines (I presume that there are high-level XML editors in CPAN) that could parse simple commands like "alphabet face_stab_then_attack" and only change one section of the file.

The solutions proposed here for external programs would both be started when KolMafia did (or whenever), and would spend their lives lying in wait for a file of a specific name to be created. Your script would just have to echo out the file, wait for a reasonable amount of time, and then do whatever it takes to get mafia to read in the new CCS file.
[/quote]

The script would only need to write the section you are concerned about. As far as I know kolmafia does not require every possible encounter to be listed, but only the ones you are concerned about.

Written right, the batch file would be started, it would then do the rest:

Start kolmafia with a script command via the cli.
wait for mafia to exit.
Read the output of the script.
If the script says it needs changes made,
  make them
  restart kolmafia and the script.
if not
  restore the original ccs file
  exit

The batch file method would not require the script to be longer than other methods. The first example was just a quick write up based on kolmafia reading the ccs every time it uses it. That just lacks any logic at all reading the ccs file a couple hundred times a day.
 
[quote author=Nightmist link=topic=115.msg524#msg524 date=1146146985]
Correct me if im wrong but I was just trying to say that to use this method we would require to exit mafia before we can edit the CCS because mafia has no inbuilt function that would launch the CCS editing script for us.
[/quote]

Have you downloaded KolMafia 8.1? It does i believe.
 
Top