GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Bound automatic diagonal heuristics by two cardinal steps by antonsoo · Pull Request #198 · libtcod/python-tcod

Conversation

@antonsoo

@antonsoo antonsoo commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

SimpleGraph can overestimate the remaining cost when a diagonal costs more than two cardinal steps. On the regression's unit-cost map, cardinal cost 1 and diagonal cost 3 return a cost-9 path although eight cardinal steps suffice.

Cap the automatic diagonal estimate at two cardinal steps. Keep the actual diagonal edge cost, diagonal-only graphs, greed multiplier and explicit heuristic overrides.

The regressions cover C/F layouts and diagonal-only movement. An independent sample-dungeon heap oracle confirms all 60 previously incorrect single-endpoint queries, with all 1,920 ordinary-cost controls unchanged. A separate many-to-many reconstruction correction handles the remaining 59 failures; both together match all 2,240 queries.

Full headless tests pass (324 passed, 95 skipped), using pinned native resource assets and SDL dummy audio. Mypy and applicable project formatting/hooks pass.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
antonsoo added 2 commits October 16, 2026 16:33
@antonsoo
Bound automatic diagonal estimates by two cardinal steps
14b4421
@antonsoo
Use literal array orders in the heuristic regression
94b4c1d
@codecov

codecov Bot commented Oct 16, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.09%. Comparing base (84dd3bb) to head (76bda52).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #198   +/-   ##
=======================================
  Coverage   86.09%   86.09%           
=======================================
  Files          29       29           
  Lines        7597     7597           
=======================================
  Hits         6541     6541           
  Misses       1056     1056           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@HexDecimal
Merge branch 'main' into fix/automatic-diagonal-heuristic
76bda52
HexDecimal
HexDecimal approved these changes Oct 17, 2026
View reviewed changes
@HexDecimal
HexDecimal merged commit 6587324 into libtcod:main Oct 17, 2026
31 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@HexDecimal HexDecimal HexDecimal approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@antonsoo @HexDecimal
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.