Post subject: Castle Adventure full run planning
Editor, Reviewer, Experienced player (968)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
As you might have seen i submitted a short run of Castle Adventure which is on the workbench at the time of writing this. http://tasvideos.org/forum/viewtopic.php?p=323664 In this topic, we will plan for a Castle Adventure full run. Feel free to help! What route to take, which order to get items, and when and where to drop items. Max number of items you can carry at any time is six. When the game ends, we need to have killed these eight monsters: δ SNAKE ☺ ANGRY DEMON x2 ☻ UGLY OGRE x2 ( BAT (need LAMP) * SMALL SPIDER (need KEY, and LAMP or NECKLACE depending on which way you enter the cellar) ☼ BIG SPIDER (need KEY, and LAMP or NECKLACE depending on which way you enter the cellar) Prerequisite for all: SWORD, duh. There is also a HELMET which helps in combat and a FLASK which acts as a health potion, but with tools I don't think either will be necessary. We also need to find these 13 treasures, and be carrying them or have dropped them in the first room when the game ends: µ FANCY GOBLET ⌂ CROWN Θ GEM Φ HOURGLASS : RUBYS (sic) t HOLY CROSS § NECKLACE ≡ SILVER BARS ♫ HARP ¥ JADE FIGURINE (need CROSS) ♦ DIAMOND (need HARP) ■ GOLDBAR (need KEY, and LAMP or NECKLACE depending on which way you enter the cellar) ß SCEPTER (need KEY, LAMP, WAND and NECKLACE) This means that except the treasures, we need to get these at some point in the run: ┼ SWORD τ KEY ♠ LAMP - WAND All other items can be safely ignored. Maps! Note that the monsters are not in the starting position in these maps, but a few steps here and there shouldn't matter for a route plan. The maps do not show the location of items you need to LOOK for such as KEY (on table on fourth floor), NECKLACE (on statue on second floor) and GEM (in fountain on starting floor). Cellar http://www.welovedosgames.net/article/Castle%20Adventure%20maps:%20Cellar/ Starting floor http://www.welovedosgames.net/article/Castle%20Adventure%20by%20Kevin%20Bales%20-%20Maps%20and%20Walkthrough/ Second floor http://www.welovedosgames.net/article/Castle%20Adventure%20maps:%20Second%20floor/ Third floor (page missing, but image works) http://www.welovedosgames.net/images/images/castle_thirdfloor.png Fourth floor http://www.welovedosgames.net/article/Castle%20Adventure%20maps:%20Upper%20Battlement/ Fifth floor http://www.welovedosgames.net/article/Castle%20Adventure%20maps:%20The%20east%20and%20west%20towers/ Sixth floor http://www.welovedosgames.net/article/Castle%20Adventure%20maps:%20Sixth%20floor%20and%20walkthrough/
Editor, Reviewer, Experienced player (968)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
So, I'll start off with some thoughts: The items/monsters are mostly clumped together in different parts of the castle. As often as possible we should try to get all items and kill all monsters in an area when we visit it, so we don't need to revisit it later. The clumps of items/monsters as I see it: - SWORD, LAMP, GEM, SNAKE - Left OGRE, FANCY GOBLET - Right OGRE, NECKLACE, HOURGLASS, Left DEMON, WAND, SILVER BARS - HARP, RUBYS (actually these two aren't that close, but off in an otherwise remote part) - HOLY CROSS, KEY, DIAMOND, JADE FIGURINE possibly connected to - Top DEMON, CROWN - BAT, SMALL SPIDER, GOLDBAR, BIG SPIDER, SCEPTER Calculating comparable distance of a route Since the castle is a grid, more or less, the shortest path between two objects can be calculated in steps. Room transitions take about the same time as 30 steps. If we give all objects a symbol, it is possible to describe a route as a string, and for a script to calculate the number of steps for this route. Big letters for treasures: F ancy goblet C rown G em O hOurglass R ubys T Holy cross (has t as its symbol) N ecklace S ilver bars H arp J ade figurine D iamond B goldBar E scEpter Small letters for other essential items: s Sword k Key l Lamp w Wand d Dropoff in first room Numbers for monsters: 1 snake 2 right ogre 3 left ogre 4 left demon 5 top demon 6 bat 7 small spider 8 big spider Example (bad route): "sklw12345678FCdGOdRdTJdNSdHDdNEd" It would also be possible to add some error checking, for example that H is before D, and that the route always ends with d. Other checks would have to be done manually. Not going over max inventory size, primarily, and the possibility of dropping stuff in rooms other than the first.
Joined: 7/2/2007
Posts: 3960
That's 26 symbols; there's thus at least 26! possible routes assuming each symbol shows up at least once. Of course many will be invalid, but brute force is still completely out of the question -- we're talking 4 * 10^26 here.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Editor, Reviewer, Experienced player (968)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Indeed there are 26! possibilities, or more actually since there needs to be more than one "d". Good solvers are available for traveling salesman problems, and 26 "cities" is nothing. The route does not easily fit into the TSP description, sadly, because of the max inventory size. That being said, here is my first suggestion for a route. Number in parentheses is inventory size after that command. We can call it... HARP/RUBYS FIRST "HRTkDJd" Get Harp (1) Get Rubys (2) (or reverse order) Get Cross (3) Get Key (4) Get Diamond (5) (or mixed order) Get Jade Figurine (6) Drop Harp, Rubys, Cross, Diamond, Jade figurine in first room (1) Drop key somewhere in the middle, best position needs to be tested (0) Start killing stuff "sl1G(drop lamp)5C" Get Sword (1) Get Lamp (2) Kill Snake Get Gem (3) Drop lamp somewhere in the middle, as above (2) Kill top Demon Get Crown (3) Tricky part "4wSOd(get lamp, key)N2" Kill left Demon Get Wand (4) Get Silver bars (5) (or mixed order of these three) Get Hourglass (6) Drop off Silver bars, Hourglass, Crown, Gem (2) Re-get Lamp, Key (4) Get Necklace (5) Kill right Ogre Final section "E(drop wand)8B76(drop key)F3d" Enter from the right (same as any% run) Get Scepter (6) Drop Wand (5) Kill Big spider Get Goldbar (6) Kill Small spider Kill Bat Drop Key (5, shortest item name, though Lamp is also OK to drop now) Get Fancy goblet (6) Kill left Ogre Exit! In string format... "HRTkDJdsl1G(drop lamp)5C4wSOd(get lamp, key)N2E(drop wand)8B76(drop key)F3d" Rules for input string: If we want to automatically check the string, these are all the rules I could think of. s before 1, 2, 3, 4, 5, 6, 7, 8 l before 6 k before 7, 8 l or N before 7, 8, B k, l, N, w before E H before D T before J final letter d (or this is assumed by the distance calculator) All valid characters except "d" need to appear exactly once.
Player (26)
Joined: 8/29/2011
Posts: 1206
Location: Amsterdam
Best of luck with this, but note that the mods have decided they don't want runs of this game on the site :(
Editor, Reviewer, Experienced player (968)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
An update! Ilari has coded a cool tool which reads the data file for CA and calculates routes between objects. It gives a comparison value for a route (not the total number of steps). Possible improvements: - Keep track of the player's inventory - Allow dropping objects in locations other than the first room - Keep track of keypresses needed to drop objects - Implement the rules about which characters need to come before others - Warn if file CASTLE.RAN is missing instead of crashing without error message The code in C++ can be accessed here: http://codepad.org/V7fEfbTK It can be run with either a string like I specified before, no spaces between locations, or with room numbers and (x,y)-positions, like HH13 IJ2, with spaces between locations. For the route I described above, Harp/Ruby first, the string is xHRDkTJds1lG5CS4wOdN2E8B76F3X (x is start position, X is end position) which is 4789 steps. (see update in next post) What can YOU do to help? You can think up a different route! A route comparison tool is no use if we only have one suggestion. Any takers?
Editor, Reviewer, Experienced player (968)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
I have made some additions. New version: http://codepad.org/OumadGDD (U mad?) Updates: - Allow dropping objects in locations other than the first room - Keep track of keypresses needed to drop objects This update adds keypresses for dropping objects, and adds the possibility of mixing x-y-roomno with object letters when you use spaces between commands. If there is a colon, the letters after it specify which objects to drop. Examples: s - go to sword HI7 - go to x=H, y=I, room number 7 s:G - go to sword and drop Gem HI7:slwENG - go to x=H, y=I, room number 7, and drop sword, lamp, wand, Scepter, Necklace and Gem The current route with this new format is: x H R D k T J d:HRDkTJ s 1 l G 5 C KI7:l S 4 w O d:SOCG KI7 N 2 E:w 8 B 7 6:k F 3 X 5023 steps As you can see (or maybe not) the drop of the lamp is moved to after killing top demon and getting Crown. Saves 10 steps. I am not sure that KI7 is the best position to drop the lamp, so if anyone wants to experiment, go ahead. In that case you need to replace both instances of KI7 in the string. Another weakness of this route is that getting Necklace and killing the right Ogre is a detour of two rooms when heading towards the Scepter. Any ideas how to change the route to fix this?
Player (26)
Joined: 8/29/2011
Posts: 1206
Location: Amsterdam
Radiant wrote:
Best of luck with this, but note that the mods have decided they don't want runs of this game on the site :(
Hold it - site management has repealed their earlier ruling, and the "low%" run of this game is now accepted. That means there's also room for a "100%" run.
Editor, Reviewer, Experienced player (968)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Radiant wrote:
Hold it - site management has repealed their earlier ruling, and the "low%" run of this game is now accepted. That means there's also room for a "100%" run.
Already on it! Since no one has posted any opinions on the route, I'll use the one specified in the previous post. As soon as I get a stretch of free time and manage to figure out how exactly Trap BIOS Keyboard works in JPC-RR, it'll be pretty quick to record.