Angband Borg -- Bugs
This page describes bugs and pending improvements for the
Angband Borg.
Table of Contents
Recent Improvements
-
Handle various subtle changes in (or before) Angband 2.8.3.
-
Notice any normal prompt/message on the message line, and use this
information both for efficiency and to notice "unexpected" prompts.
Unexpected prompts (and messages) now induce an abort.
-
When walking along a flow, "traps" and "doors" are penalized slightly
relative to other types of terrain, because open floors (for example)
are usually faster and/or safer.
-
The nasty infinite recall bug has been squashed. All monsters and
objects thought to be "under" the player will be deleted.
-
Running out of light is now a fatal error, like dying.
-
Most "keypress" sending is now commented as such. Walking is now
always done with the semicolon key. The Borg uses spells against
some terrain features, including jammed doors.
-
Runes of protection are recognized (and ignored).
-
Dying (and not cheating death) will now cause the Borg to abort.
-
The Borg will now use "sub-windows" to obtain the inventory/equipment
if available, and otherwise will use the "inventory" and "equipment"
commands to extract the inventory/equipment from the screen. Spell
books are now only browsed when "necessary", and browsing uses the
normal "browse" commands. Panel extraction uses the normal "panel"
command. There are only a few non-obvious "cheats" left (including
total weight extraction).
-
Failing to attack an adjacent monster via the "alter" command will
now trigger the deletion of nearby monsters, which will allow any
adjacent objects that look like monsters to be recreated as objects,
preventing the infinite looping due to dead creeping coins bug.
-
Some "save game" flags are now operational, and allow the game to be
saved every time the player level and/or dungeon depth changes.
-
Objects are only assumed to be "visible" when they are in line of sight.
This should help fix certain infinite loop situations. Seeing a monster
on top of an object does not cause the object to be forgotten.
-
Incorporated new field of view code from main game. The new floor grid
colors (yellow for torch lit, dark gray for blind or non-illuminated) are
now handled.
-
A serious attempt is now made to parse every single message from the
game, and unknown messages are logged. All messages involving monsters
are now handled by code which notices possible monster references as the
subject or object of a sentence, and parses the sentence accordingly.
-
All shop goals are now cleared when the inventory (but not the equipment)
changes, to prevent problems when the inventory changes due to theft or
the acquirement of new stuff while in town.
-
The Borg now uses "scrolls of *identify*" on special ego-items, and then
uses the examine command to find out their special power, and inscribes
them according to their special power for use by the object parser.
-
The Borg now assume a single charge on un-known staffs/wands, unless
they are actually marked empty. This allows escape (via staffs of
teleportation) after mind blast, and might allow use of un-known
attack wands/staffs until they are actually empty.
-
The Borg now extracts information from object inscriptions only when
the object description changes. Special "BORG_xxx" inscriptions can
be used to track the "extra" flags on certain ego-items, though this
will not be very useful without code to use "scrolls of *identify*".
-
The Borg now ignores the "offscreen" notation in monster names.
-
The "cheating" functions have all been isolated to "borg1.c".
-
The Borg is now able to use most dragon scale mail activations, and all
"normal" artifact activation attacks.
-
The Borg now caches actual "danger" values for the flow routines, and
only recalculates this cached danger when absolutely necessary. This
may have increased the speed of the flow routines.
-
The Borg allocates several global structures to hold his information,
including "db_ptr" to hold "dungeon" information and "ab_ptr" to hold
"textual analysis" information. The Borg has been modified like the
code itself to break all cave grid information out into sub-arrays.
-
Various files were rearranged slightly. All the globals were moved
into "borg1.c". All the initialization code was moved into "borg9.c".
All of the header files were merged into "borg.h".
-
The Borg now assumes that unknown grids are floor grids when checking
if a monster can reach a grid with a ranged attack.
-
Do not flee from multipliers (when lacking recall power) until there
are at least 3 of them on the level.
-
Any "bizarre" lite is assumed to be an artifact lite.
-
The Borg now keeps track of his "favorite" depth, and will not go below
this depth until he has completed it 10 times (unless he is fleeing).
The Borg will never take stairs down when waiting for recall to kick in.
-
The Borg now uses a special "borg_prepare()" command to deal with the
fact that a human created the character and might do stuff to it, or to
the game, so whenever the Borg gets control, he sets various options as
he needs them to be set, and extracts some information directly from the
game, such as maximum dungeon depth and known dead uniques.
-
The Borg now uses the new "alter" command to attack monsters.
Pending Improvements
-
Perhaps the Borg should be taught to work with whatever attr/char
mappings are in place (with various degrees of efficiency), with
the "borg_prepare" function setting up the helper arrays and
setting a flag specifying how "borg_update_map" should work.
-
Perhaps take into account the fact that only one monster can
occupy each grid touching the player, and that certain monster
spells cannot pass through other monsters. Being terrified of
a pack of novice rangers is rather pathetic.
-
Telepathy induces twitchy behavior, in that every monster movement
causes recalculation of the flow. This is presumably partially to
induce danger recalculation. Perhaps there is a faster way.
-
Being "blind" or "hallucinating" will seriously confuse the Borg.
A mind flayer just mind blasted my gnome mage (blindness and slowness),
and then the gnome mage just rested next to the mind flayer until dead.
-
Sell discounted items before non-discounted items, especially when
dealing with spellbooks. Or use the options which force combination
of discounted/inscribed objects.
-
Ignore cure serious wounds potions after player level 20, and desire
more cure critical wounds potions.
-
It would be nice if the Borg could "save" its internal state, so that
when it entered a new level, it could save its state, and the game, so
that debugging problems would be greatly facilitated. For now it saves
the random seed, but this is not sufficient.
-
Make sure "extra might" and "extra shots" are correctly parsed.
-
The Borg needs a command to completely dump its internal state.
-
The Borg is twitching sometimes. This includes when recall has
been read and he runs towards stairs but is not allowed to take
them anywhere.
-
The Borg was trying to dig into walls, but this may have been
the broken location tracker?
-
I definitely saw the Borg trying to tunnel into some rubble, using the
old "099T8" code, and he was getting "Take off?" messages. The player
started in roguelike mode, but the Borg changed that to original.
-
Do something useful with negative monster indexes when parsing
messages about monster damage.
-
Take monster speed into account when determining if a monster
could have been responsible for various messages. Perhaps the
message assignment should not deal with "before" and "after"
locations, but instead should explicitly handle things like
hitting a teleport trap or being teleported away or using
teleportation successfully.
-
Re-acquire the latest "update_bonuses()" function for the Borg,
and modify it to use the "borg_base_xxx" variables. Then make
sure that the "borg_base_xxx" variables are not used elsewhere.
Then allow the "b_ptr" variables to be modified while checking
to see if various "resist" spells would reduce current danger.
-
Use "borg_base_xxx" for the "actual" values, or some "screen"
representation, and also for values extracted from messages,
and then use the "b_ptr" values for the "predicted" values,
normally the same as the "actual" ones, but apply predicted
spells and such, including beserk strength and restore stat.
All the "predicted" values should perhaps be updated in the
"borg_power" function (and others). New "borg_base_xxx"
variables are needed to track temporary effects like the
various resistance spells.
-
Special "instant death" prevention (perhaps in ready for depth
code) to avoid instant death from drolems, drakolisks, etc.
-
Class specific "ready for depth" checks, in particular, check
player level and primary player skills.
-
Consider some kind of "expected danger" calculation, and then use
that calculation for something, perhaps to decide which monster to
attack first.
-
The Borg should collect scrolls of *identify* and hold on to some
special ego-items until he has a change to *identify* them. The
Borg should *identify* artifacts to prevent memory loss.
-
The "completed the level" code is wrong, it says yes even if only one
room has been explored and the door is blocked by a floating eye.
-
The "danger" array must be reset whenever changes occur in the
player state which might affect danger, including changes in the
player speed, or equipment. Make sure that nothing else except
monster motion can affect the danger calculations, including
changes in the dungeon state.
-
Monsters which step in, perform an attack, and then step away,
including any monster which stumbles and is moving faster than
the player, may not be correctly matched, yielding "fear".
-
Reward the use of certain resistances in certain places, so that
shields of resistance will be favored even if a defender weapon
is being used, for example.
-
The Borg "Test" was just in town in an infinite loop of the
"flowing 0 grids to stairs" and "flowing 1 grids to stairs"
variety.
-
The Borg named "Player" is weak, and has only one "msp", so he
is starving to death in town. There may or may not be food in
the general store. The mana is probably from heavy armor.
-
The "retreat" code seems to be inducing retreating from monsters
which move *slightly* faster than the player, which, when used
to induce the pillar healing trick, results in player death.
This is extremely bad. This happens a lot with low level mages.
-
Verify "telepathy" algorithm against the real code.
-
At early levels, must be more careful about running out of
food and/or fuel. Perhaps use some horrible technique like
walk around (learning walls) and try "up" in every grid.
-
With a rod of recall the Borg was walking from depth 8+ all
the way to town, for fun.
-
Perhaps special "sanity" code which could get run once per
dungeon level, or before leaving town. Check unique monster
list for dead uniques, discard known cursed artifacts, etc.
-
Perhaps allow powerdiving down to next unique monster depth.
-
Perhaps extend "inventory" by 24 slots (the home) to simplify
some checks. If not, do special "home" checks. If nothing
else, use this "fake" index for notational purposes. Maybe.
-
Better choices about crushing junk and full slots. In particular,
weight power more than price, especially when money is plentiful.
-
Recharge staffs with low charges, with good spell, and
recharge weak teleport staffs in town with high cash
or cheap recharge. Recharge rods with big spell. Exit
loop as soon as an attempt fails. Or search for best.
-
Keep track of "normalized" base stats for checking to
see if we need to use stat potions (note maximize mode).
Restore stats with stat gain potions. Use prayers and
such to restore stats. Only use enchantment spells in
town (for extreme bonuses). Enchant ammo when bored.
Special variable to hold maximum enchantment (normal +8,
rich and town +10, prayer and town +12 or +15).
-
Special flag to flow code to avoid unknown grids, for
efficiency.
-
Rarely (or never) attempt to attack while afraid.
-
Comment on inability to refuel, eat, etc. Comment on the
purpose of casting spells (after casting) if useful, such
as heal spells.
-
Do not rest near multipliers, mana drainers, or uniques.
-
Special code after being teleported by monsters to
avoid getting confused about assigning monster names.
-
Simulate monster drops so as to be sure we get all the
stuff that the monster dropped. Should be sufficient
to create nine fake objects (where meaningful).
-
Something about beams and walls.
-
Reduce desirability of ball attacks that may damage
good stuff on the ground.
-
Take into account next few unique monsters in the list
and be much more likely to assume their existance when
identifying a monster. Never teleport away a unique,
unless we are about to die. Treat teleport away as
instant death to monsters if it works.
-
Modifications of the escape code, taking into account
possibility of instant death from bad phase door, and
presence of unique monster that needs to be killed.
Use special healing techniques to survive long enough
to finish off special uniques.
-
Have the "restock" and "prepared" functions return strings
for debugging purposes. Use class specific requirements
to check to see if prepared for various levels. Never
go below level 10 with drained stats. Perform an accurate
check of dead uniques, and use this information to never
go below the residence of two living uniques.
-
Do two separate checks, one to see if monsters can kill us
in a single blow, and one to see how dangerous a monster
will probably be, factoring in spell chances and such.
-
Special flag when looking for a monster to kill, that is,
monsters which summon are not extra "dangerous", but they
should be attacked first. Also, attempt to kill multipliers
first, but do not be terrified of them.
-
Take account of temporary flags when evaluating monster
danger. Only count "extra" effects when asked. Count
stat draining extra in certain cases, like losing the
primary spell stat, or going below a Con of 8. Ignore
stat drain if prayer or rod can restore it. Ignore
experience drain if prayer or rod can restore it. Factor
in approximate chance of monster hitting. Limit breath
attacks to maximal possible damage. Apply protection
from evil and globe of invulnerability. Apply saving
throw, if not perfect, reduce by some amount.
-
Take restore experience potions into dungeon once you
reach a certain depth. Also, replace cure serious by
cure critical once you reach a certain depth. Once you
reach a certain level, stockpile a whole bunch of books
and cure critical and cure life levels at home.
-
Analyze power of home using a formula that rewards some
duplication of resistances and such, but penalizes too
much duplication. Use this to see what to keep at home.
-
Reward restore mana when mana reaches 100. Reward heal
when hitpoints reach 400. Only reward cure serious if
we are low on cure critical. Carry up to 30 ammo if we
are weak, up to 50 if we are strong, and up to 90 if we
are really strong. But try to avoid multiple stacks of
ammo in the inventory. Reward stat potions based on how
useful they would be. Reward enchantment a lot less than
we have been. Keep two copies of each book after dungeon
level 5, and four copies after dungeon level 50.
-
Reward food a lot when hungry. Do not count food spells
when weak with hunger. This will allow fleeing to town
to buy food.
-
Allow telepathy to substitute for see invisible for seeing
if dungeon level 10 is okay. Reward resist poison, nether,
disenchantment, by a lot, when approaching deep dungeon.
Special code to prepare for final fight against Morgoth.
Perhaps even do special code for each of several uniques.
-
Reward primary stat based on what you actually get for
it, including mana, failure rate. Reward hitpoint bonus
from Con. Reward Chr until gold is high. Tiny bonus for
each point of each stat, to encourage strict upgrading.
Reward perfect saving throws. Reward zero failure rates.
Reward device skill and saving throw and bow skill. Reward
see invisible less if you have telepathy. Reward hold life
less if you have experience to spare. Reward all four of
the basic resistances together. Reward the first 10 points
of armor by a lot. Penalize heavy armor until level 30.
Reward first phase door by a lot. After level 25, reward
extra teleport staffs.
-
Reward artifact lights in such a way as to induce the
proper progression of activations.
-
Reward speed based on a sliding scale.
-
Reduce ammo reward to 50000 for bolts and 30000 for
arrows.
-
Assume everything is enchanted up to +8 if the player
has enough gold or prayers. Reward damage based on
some approximate estimation of slay flags. For bows,
reduce the hit reward to 50, and the damage reward to
250, assuming full +8 enchantment when the player has
enough gold or prayers. For weapons, use 25 for hit,
and 100 for damage (but apply slays).
-
Something about counting duplicate items in the home.
Also, count number of each resistance in the home, and
amount of stat bonuses, and approximate damage power.
Do not collect wands/staffs with few charges unless
there is nothing better to do. Flags to pretend that
the home is empty or that there is only a single item.
-
Handle "maximize" mode correctly.
-
Count recall spell/prayer (sounds dangerous). Count
restoration prayer. Use restoration rod.
-
Count physical staffs of teleportation (with charges).
-
Enchant weapons/armor up to +12 (not +8) when playing
a priest with the proper enchantment prayer. Enchant
missiles once we have sufficient cash, or a prayer.
-
Allow attacking with bare hands (calculate damage).
-
Clear shop goals whenever inventory changes.
-
Take spell/prayer failure rate into account. This will
add another field to the auto_spell data (fail rate).
Require 80% success for "satisfy hunger" to replace food.
-
Learn and use the detect monster (and detect object)
spells/prayers, once per panel as appropriate.
-
Let priest apply weighted average of predicted prayer
that will get learned, or something.
-
Reduce desire for light area to 65. Increase desire
of identify to 96. Use haste self, essense of speed,
resist spells, shield, globe of invul. Lower desire
for remove fear and call light to 35. Increase orb
of draining to 90. Reduce holy infusion prayers to
a desire of 50.
-
Special "safe_home" pointer.
-
Special flag for fighting unique, to prevent running away.
-
Track actual stat bonuses, of equipment and in home.
-
Make sure not to step on our own local RNG state.
-
Treat "heavy stun" as much more important than "stun".
-
Keep track of "perma-speed" and "temp-speed" separately.
-
Stop playing (or retire) when Morgoth is dead. Of course,
this requires special code to beat him in the first place.
-
Something about counting number of suppliers of a resistance.
-
Count, and require, staffs/potions of speed, restore mana,
and healing.
-
Borg should track "slays" on weapon, and current "temporary"
resistances, plus perhaps a guess about when they will end.
-
Borg should prefer "Ring of Int (+6)" to "Ring of Int (+4)"
even if currently at maximal Int, for future swaps.
-
Borg should use a recall+drop+rest hack to destroy cursed
artifacts once they are identified.
-
Borg should be careful with moving and altering grids.
-
Borg should not be afraid of "dead" invisible monsters.
-
The new "look" function is almost good enough for the Borg to
actually use. It would make him extremely annoying, however,
so perhaps it should only be used occasionally.
-
Without recall, when cornered by reproducing monsters, attempt
to do something, like permanently boost bravery, or ignore any
reproducing monsters, or teleport, or do something.
-
Add danger for being in a grid which is "reachable" by a dangerous
monster, but do not collect this danger over time. This may prevent
the Borg from resting in a grid while a dangerous monster approaches,
or walking into a room containing a dangerous monster.
-
The Borg needs to use "resistance" spells, and "speed" spells, etc,
the first step is to "track" various conditions by parsing the new
open/shut messages.
-
The Borg is still too wimpy about diving into the dungeon, perhaps
because he spends too much time on easy levels when power diving.
-
Verify the "monster assignment" code, and try to use the "used" flag
to spread possible message inducers around various monsters.
-
Take into account the "range" of the "fire" and "throw" commands, plus
the "useful" range of these commands.
-
Keep track of what monsters are known to be on the level, especially
uniques, and use this knowledge when guessing monster identities.
-
For simulating the danger posed by multiple step motions, the Borg
should probably attempt to take account of things like walls which
block the movement of monsters, this can even be overly restrictive,
since when he gets closer, he can notice other possibilities.
-
After using phase door to escape from danger, the Borg should try to
run to a grid which is far away from the monsters which induced the
phase door in the first place, or nothing has been accomplished. In
the same vein, perhaps the Borg should attempt to "escape" from any
monsters which, if they get close, would be dangerous.
-
The Borg should not spend his last mana killing lice, since he then
may not be able to teleport or recall. In fact, when using mana for
teleportation points, the Borg must reserve some mana at all times.
-
The Borg needs to carry multiple staffs of teleportation to dive below
dungeon level 30 or so, since fire breathing monsters are common there.
-
The Borg needs to "preserve" ammo for crucial situations, such as
becoming "afraid", instead of wasting it all on wimpy monsters.
In fact, wimpy monsters should never be attacked with ammo, or
with flasks of oil.
-
Assigning monster identity when confused needs special code.
-
Actually, the Borg needs to keep track of the "potentially best"
item for each slot (ignoring the current item in the slot), and
keep this item in his house. This means that he should assume
full enchantment, and should use some heuristics about the type
of resistances and such he would "like" to have with an item.
-
The Borg should only stockpile the ten "best" artifacts in the home,
this will allow getting rid of the stupid daggers and such.
-
The "twitchy" code, if it is ever activated, should do teleportation,
since it is now only used to escape "destroyed" levels.
-
Consider attacking (to reduce danger) before considering fleeing,
since if there is only one dangerous monster, and it can be killed
in one blow, then this is normally the correct action to perform.
But be careful about possible "failure" of spells and such.
-
Require an advantage to retreating, such as restoring hp/sp/etc,
or getting closer to stairs, or waiting for recall, to prevent
the Borg from playing the pillar trick forever for no reason,
since he will eventually starve to death.
-
The "borg_locate_kill()" routine can create multiple monsters per
grid if it notices certain monsters standing on top of certain
objects at certain times.
-
The "count kills" and "count appearances" code has been disabled,
and the Borg no longer notices when uniques die. This is bad.
-
The current "borg_recover()" function is often dangerous, since
the Borg uses up spell-points that he should really be hoarding.
-
Reward "usable" items, such as "attack wands", so we do not
destroy them before "potions of water" or "boring wands",
when we are "slow" or in need of an empty slot.
-
Need a better "cost" calculation for the use of spells, prayers,
wands, staffs, etc, taking into account failure rates, mana cost,
non-reusable charges, etc.
-
The Borg should take into account failure rates and mana costs
and such, especially failure rates. This is crucial.
-
Apply some heuristics to choose which wand/staff to recharge.
-
Do stuff with "followed" monsters to allow tracking multiple
possible routes they could take, or at least to realize when
a "followed" monster is seen somewhere else along the path.
-
The Borg needs to use "call lite" as an attack, plus the "dispel"
prayers and staffs and scrolls, plus various artifacts which do
"dispel" style activations.
-
The Borg can be killed by monsters which are slightly faster than
him, since they may get two sequential nasty attacks, and the Borg
assumes that they only get one full attack and one partial attack.
-
The Borg needs to use "sleep monster", "slow monster", "confuse
monster", "teleport away", etc.
-
The Borg needs to use more "spells", "prayers", and objects.
-
The new "follow" code should be less restrictive, without allowing
painful infinite loops, and we need better "expiration" functions.
-
Using shovels would be very helpful, especially for low level mages.
-
The Borg should reduce the danger from monsters which "stumble",
and from monsters which only sometimes cast nasty spells, if not
always, then certainly when simulating multiple moves. This is
currently done, but not quite correctly.
-
The Borg should "delete" any monsters which "blink" or "teleport",
since the odds of correctly "tracking" or "following" them is low.
The Borg should reset his "goal" location after being teleported
by a monster.
-
The Borg should attempt to "track" monsters which move, say, two
grids in two turns, and in which the monster was unseen during
the middle turn. This may stop the "hallway bleed" factor.
-
The Borg needs to distinguish "damage" and "annoyance", for example,
being "teleported" is not fatal, nor is being "robbed", but they are
both really annoying, and "disenchantment" is almost more annoying
than actual death, but all of these are preferable to standing next
to a monster which can induce death in a single blow.
Go back to the
Angband Borg Home Page
See also Ben Harrison's Home Page /
Ben Harrison /
benh@phial.com