HPM Solver for Openclaw

A mathematical optimization tool designed to calculate the most efficient purchase combinations in Harry Potter Magic Awakened.

xilowei920
v1.0.0
Apr 5, 2026
0
743
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install hpm-solver

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install hpm-solver using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is HPM Solver?

The HPM Solver is a specialized utility for players of Harry Potter Magic Awakened (HPM) that solves for the optimal combination of items to meet specific gold or diamond targets. By leveraging a multi-variable linear equation model, it helps users maximize their in-game currency efficiency. This technical tool is a standout among Openclaw Skills for its ability to handle complex game-specific economic variables like food and plant coefficients.

At its core, the skill uses a sophisticated v5 algorithm that includes equivalence grouping and divisibility filtering. This ensures that even with a large catalog of items, the solver remains performant and accurate. Whether you are looking for a perfect solution with zero residual value or the closest possible match, this Openclaw Skills asset provides clear, actionable results for competitive players.

HPM Solver Use Cases

  • Calculating the exact item mix to reach a specific gold target in Harry Potter Magic Awakened.
  • Optimizing diamond spending across different item categories.
  • Handling complex trading scenarios involving food (p) and plant (q) multipliers.
  • Finding purchase combinations that result in zero residual currency.

How HPM Solver Works

  1. The skill performs equivalence grouping by merging items with identical base prices to reduce the computational search space.
  2. It applies divisibility filtering to remove high-priced items that can be perfectly substituted by lower-priced ones.
  3. An exhaustive search algorithm iterates through possible combinations from highest to lowest price to find the perfect or nearest match.
  4. The system performs equivalent replacement restoration to provide a user-friendly list of specific items to purchase.

HPM Solver Setup

Download the source package and integrate the solver.js utility into your project. For WeChat Mini-program developers, ensure the following structure:

# Extract the hpm-miniprogram-v13.tar.gz package
# Place solver.js into your utils folder

Initialize the solver within your application logic:

const { HPMSolver } = require('../../utils/solver');
const solver = new HPMSolver(prices, prices.maxQuantities);
const result = solver.solve(7500, 0, 1.5, 1.0);

HPM Solver Data Schema & Taxonomy

The skill utilizes a structured JSON format for price management and solving results:

Component Description
Base Prices Nested object containing gold and diamond prices for 'foods' and 'plants'.
Max Quantities Limits on how many of each specific item can be purchased.
Multipliers p (Food) and q (Plant) coefficients used to calculate actual prices.
Solver Output Returns groups, totalCost, residual, and success status (isPerfect).

Detailed stats including goldItemsBefore and goldGroupsAfter are provided to track optimization efficiency.

HPM Solver Advanced Features

  • Dual-coefficient modeling for independent calculation of Food and Plant systems.
  • Intelligent divisibility filtering to optimize algorithm performance by up to 60%.
  • Residual value minimization for non-perfect trading scenarios.
  • Comprehensive stats reporting including item count reduction metrics.
  • Seamless WeChat Mini-program integration with dedicated history and management pages.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*