npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tscircuit/high-density-a01

v0.0.13

Published

A high density zero-obstacle solver

Readme

@tscircuit/high-density-a01

A high density zero-obstacle solver

This is a @tscircuit/solver-utils BaseSolver-compatible solver with the following properties:

  • Multi-layer
  • Grid-based
  • Supports High Density Types from tscircuit-autorouter
  • Rip'n'Replace with History (@tscircuit/hypergraph-inspired)
  • Via Penalty and Trace Penalty Map

Usage

const solver = new HighDensitySolverA01({
  nodeWithPortPoints,
  cellSizeMm: 0.05,
  viaDiameter: 0.3,
  stepMultiplier: 4, // optional, each solver step runs 4 internal steps

  // optional hyperparameters to control algorithm
  // Unit of penalty is ~mm
  hyperParameters: {
    shuffleSeed: 0,
    ripCost: 10,
    ripTracePenalty: 0.5,
    ripViaPenalty: 0.75,
    viaBaseCost: 0.1,
  },

  // Optional functions to generate initial penalty map
  // initialPenaltyFn: ({ x, y, px, py, row, col }) => ...
})

solver.solve()

How it works

We form a grid based on the parameters cellSizeMm

We compute the initial penalty map from the initialPenaltyFn, this function sets an additional cost of traversal for a cell. This function accepts x,y which represent the "real coordinates", as well as px/py which are [0,1] representing the fraction of the coordinate within the problem bounds.

We shuffle the trace order based on the shuffle seed.

We run a basic A* solver for each path from the start to the end. When we explore, we consider both used and unused cells via the usedCell structure. The usedCell structure contains 0 or 1 depending on whether or not a cell has been used by either a trace or via. When we explore, we explore in 8 directions as well as creating a via. A via enables exploring to any other layer. When a cell is used, we add the ripCost to the exploration of that path. A path that rips the same trace will only incur the ripCost once, so we must track for each path what traces have been ripped.

When we reach the end of a path, we then mark that route as solved and apply the used cells to the usedCell structure. Note that vias occupy more cells based on the viaDiameter. We then see if we needed to rip any traces. When we rip a trace, we remove it from the usedCell structure, remove it from the solvedConnections list and add it back to the unsolvedConnections queue.