Odd maximizer failure

AlbinoRhino

Active member
I've been puzzling over this and can't figure out what is going on here. Anyone have any ideas why this keeps failing? I originally had some modifiers included in the maximization line, but even when I reduce it to just this, it still fails. Looking at the attached log, it seems the hardhat is immediately equipped (not sure why?) which, since the outfit includes a hat, may be why it eventually fails? Dunno, I'm lost here.

> maximize +outfit fantasyrealm thief's outfit +equip fantasyrealm g. e. m.


Maximizing...
1848 combinations checked, best score 0.00 (FAIL)
Putting on electrician's hardhat...
Equipment changed.
Wielding Mer-kin hookspear...
Equipment changed.
Holding aerogel attache case...
Equipment changed.
Putting on sea salt scrubs...
Equipment changed.
Putting on Mr. Cheeng's spectacles...
Equipment changed.
Putting on mafia pointer finger ring...
Equipment changed.
Unable to meet all requirements via equipment changes.
See the Modifier Maximizer for further suggestions.
 

Attachments

  • DEBUG_20180826.txt
    59.6 KB · Views: 221

AlbinoRhino

Active member
Hm. If I manually equip the outfit and g.e.m. first, and then maximize, the maximization works...i.e. doesn't report a failure.
 

Darzil

Developer
Adding dump shows the items passed to the evaluator loop, adding 2 dump also shows all the scores generated.
 

AlbinoRhino

Active member
Definitely seems to be related to the "outfit" keyword. As long as the outfit is already equipped, everything else seems to work as expected....it's when the maximizer is required to equip the outfit that it is failing. Maybe satisfying the "outfit" word is being given lower priority than satisfying other things?
 

AlbinoRhino

Active member
Adding dump shows the items passed to the evaluator loop, adding 2 dump also shows all the scores generated.

> maximize +spooky res +outfit fantasyrealm thief's +equip fantasyrealm g. e. m. +dump

Maximizing...
Outfits [Slimesuit, FantasyRealm Thief's Outfit]
SLOT 0
[corrosive cowl, jewel-eyed wizard hat]
SLOT 1
[jungle drum]
SLOT 2
[]
SLOT 3
[Scepter of Loathing, Operation Patriot Shield]
SLOT 4
[Buddy Bjorn, Camp Scout backpack]
SLOT 5
[trench coat, flaming pink shirt]
SLOT 6
[hardened slime pants, Pantsgiving]
SLOT 7
[FantasyRealm G. E. M., Pocket Square of Loathing, over-the-shoulder Folder Holder, Mr. Screege's spectacles, V for Vivala mask, Kremlin's Greatest Briefcase]
SLOT 8
[Dinsey's pizza cutter, haiku katana]
SLOT 9
[Granny Hackleton's Gatling gun]
SLOT 10
[little box of fireworks]
SLOT 11
[]
SLOT 12
[]
SLOT 13
[glow-in-the-dark wristwatch]
SLOT 14
[Dinsey's pizza cutter, titanium assault umbrella, haiku katana]
SLOT 15
[]
SLOT 16
[]
SLOT 17
[]
SLOT 18
[]
SLOT 19
[]
SLOT 20
[]
SLOT 21
[]
SLOT 22
[]
SLOT 23
[]
3917 combinations checked, best score 43.00 (FAIL)
10285 combinations checked, best score 43.00 (FAIL)
10640 combinations checked, best score 43.00 (FAIL)
Putting on hardened slime hat...
Equipment changed.
Wielding Dinsey's pizza cutter...
Equipment changed.
Holding Scepter of Loathing...
Equipment changed.
Putting on Buddy Bjorn...
Equipment changed.
Putting on trench coat...
Equipment changed.
Putting on hardened slime pants...
Equipment changed.
Putting on Pocket Square of Loathing...
Equipment changed.
Putting on over-the-shoulder Folder Holder...
Equipment changed.
Putting on hardened slime belt...
Equipment changed.
Unable to meet all requirements via equipment changes.
See the Modifier Maximizer for further suggestions.
 

AlbinoRhino

Active member
Not sure how to read that information....seems to be preferring the (unrequested) Slimesuit outfit? I guess b/c of requesting +spooky res?
 
Last edited:

AlbinoRhino

Active member
Should have stuck with my original example...


> maximize +outfit fantasyrealm thief's +equip fantasyrealm g. e. m. +dump

Maximizing...
Outfits [FantasyRealm Thief's Outfit]
SLOT 0
[electrician's hardhat, jewel-eyed wizard hat]
SLOT 1
[bindlestocking]
SLOT 2
[]
SLOT 3
[aerogel attache case, Operation Patriot Shield]
SLOT 4
[Camp Scout backpack]
SLOT 5
[sea salt scrubs, flaming pink shirt]
SLOT 6
[Pantsgiving]
SLOT 7
[FantasyRealm G. E. M., Mr. Cheeng's spectacles, mafia pointer finger ring, Mr. Screege's spectacles, V for Vivala mask, Kremlin's Greatest Briefcase]
SLOT 8
[Mer-kin hookspear, haiku katana]
SLOT 9
[Granny Hackleton's Gatling gun]
SLOT 10
[little box of fireworks]
SLOT 11
[]
SLOT 12
[]
SLOT 13
[glow-in-the-dark wristwatch]
SLOT 14
[Mer-kin hookspear, haiku katana]
SLOT 15
[]
SLOT 16
[]
SLOT 17
[]
SLOT 18
[]
SLOT 19
[]
SLOT 20
[]
SLOT 21
[]
SLOT 22
[]
SLOT 23
[]
1206 combinations checked, best score 0.00 (FAIL)
1848 combinations checked, best score 0.00 (FAIL)
Putting on electrician's hardhat...
Equipment changed.
Wielding Mer-kin hookspear...
Equipment changed.
Holding aerogel attache case...
Equipment changed.
Putting on sea salt scrubs...
Equipment changed.
Putting on Mr. Cheeng's spectacles...
Equipment changed.
Putting on mafia pointer finger ring...
Equipment changed.
Unable to meet all requirements via equipment changes.
See the Modifier Maximizer for further suggestions.
 

AlbinoRhino

Active member
Here's the same but with the outfit pre-equipped.

> maximize +outfit fantasyrealm thief's +equip fantasyrealm g. e. m. +dump

Maximizing...
Outfits [FantasyRealm Thief's Outfit]
SLOT 0
[electrician's hardhat, FantasyRealm Rogue's Mask]
SLOT 1
[bindlestocking]
SLOT 2
[]
SLOT 3
[aerogel attache case]
SLOT 4
[Camp Scout backpack, Duke Vampire's regal cloak]
SLOT 5
[sea salt scrubs]
SLOT 6
[Pantsgiving, leggings of the Spider Queen]
SLOT 7
[FantasyRealm G. E. M., Mr. Cheeng's spectacles, mafia pointer finger ring, Mr. Screege's spectacles, Master Thief's utility belt]
SLOT 8
[Mer-kin hookspear]
SLOT 9
[Granny Hackleton's Gatling gun]
SLOT 10
[little box of fireworks]
SLOT 11
[]
SLOT 12
[]
SLOT 13
[glow-in-the-dark wristwatch]
SLOT 14
[Mer-kin hookspear]
SLOT 15
[]
SLOT 16
[]
SLOT 17
[]
SLOT 18
[]
SLOT 19
[]
SLOT 20
[]
SLOT 21
[]
SLOT 22
[]
SLOT 23
[]
308 combinations checked, best score 0.00 (FAIL)
1040 combinations checked, best score 0.00
Putting on FantasyRealm G. E. M....
Equipment changed.
 

Darzil

Developer
Well, I know where it is failing, but I'm struggling with why.

Somehow, the line : "AdventureResult item = (AdventureResult) pieces[ idx ];" is failing to set the item to "FantasyRealm Rogue's Mask", though it works for everything else I've seen, and pieces [ 0 ] is "FantasyRealm Rogue's Mask", instead it is null.

As a result, Maximizer thinks it cannot complete the outfit, so fails.

Code:
	public void tryOutfits( ArrayList<FamiliarData> enthronedFamiliars, BooleanArray usefulOutfits, TreeMap outfitPieces, ArrayList[] possibles,
			AdventureResult bestCard, FamiliarData useCrownFamiliar, FamiliarData useBjornFamiliar )
		throws MaximizerInterruptedException
	{
		Object mark = this.mark();
		for ( int outfit = usefulOutfits.size() - 1; outfit >= 0; --outfit )
		{
			if ( !usefulOutfits.get( outfit ) ) continue;
			AdventureResult[] pieces = EquipmentDatabase.getOutfit( outfit ).getPieces();
		pieceloop:
			for ( int idx = pieces.length - 1; ; --idx )
			{
				if ( idx == -1 )
				{	// all pieces successfully put on
					this.tryFamiliarItems( enthronedFamiliars, possibles, bestCard, useCrownFamiliar, useBjornFamiliar );
					break;
				}
				AdventureResult item = (AdventureResult) pieces[ idx ];
				if ( item == null ) break;	// not available
				int count = item.getCount();
				int slot = EquipmentManager.itemIdToEquipmentType( item.getItemId() );

				switch ( slot )
				{
				case EquipmentManager.HAT:
				case EquipmentManager.PANTS:
				case EquipmentManager.SHIRT:
					if ( item.equals( this.equipment[ slot ] ) )
					{	// already worn
						continue pieceloop;
					}
					if ( item.equals( this.equipment[ EquipmentManager.FAMILIAR ] ) )
					{
						--count;
					}
					break;
				case EquipmentManager.WEAPON:
				case EquipmentManager.OFFHAND:
					if ( item.equals( this.equipment[ EquipmentManager.WEAPON ] ) ||
						item.equals( this.equipment[ EquipmentManager.OFFHAND ] ) )
					{	// already worn
						continue pieceloop;
					}
					if ( item.equals( this.equipment[ EquipmentManager.FAMILIAR ] ) )
					{
						--count;
					}
					break;
				case EquipmentManager.ACCESSORY1:
					if ( item.equals( this.equipment[ EquipmentManager.ACCESSORY1 ] ) ||
						item.equals( this.equipment[ EquipmentManager.ACCESSORY2 ] ) ||
						item.equals( this.equipment[ EquipmentManager.ACCESSORY3 ] ) )
					{	// already worn
						continue pieceloop;
					}
					if ( item.equals( this.equipment[ EquipmentManager.FAMILIAR ] ) )
					{
						--count;
					}
					if ( this.equipment[ EquipmentManager.ACCESSORY3 ] == null )
					{
						slot = EquipmentManager.ACCESSORY3;
					}
					else if ( this.equipment[ EquipmentManager.ACCESSORY2 ] == null )
					{
						slot = EquipmentManager.ACCESSORY2;
					}
					break;
				default:
					break pieceloop;	// don't know how to wear that
				}

				if ( count <= 0 ) break;	// none available
				if ( this.equipment[ slot ] != null ) break; // slot taken
				this.equipment[ slot ] = item;
			}
			this.restore( mark );
		}

		this.tryFamiliarItems( enthronedFamiliars, possibles, bestCard, useCrownFamiliar, useBjornFamiliar );
	}
 
Last edited:

Darzil

Developer
I got sufficiently annoyed by it to install Eclipse. I more often don't bother with a proper debugging tool that I have to install and learn !
 
Top