Giter Site home page Giter Site logo

jbzdarkid / jbzdarkid.github.io Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 1.0 56.99 MB

The new permanent home of witnesspuzzles

Home Page: https://witnesspuzzles.com

License: BSD 3-Clause "New" or "Revised" License

HTML 98.68% JavaScript 1.31% CSS 0.01%

jbzdarkid.github.io's People

Contributors

jbzdarkid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

pamymaf

jbzdarkid.github.io's Issues

Bug list

  • Get 6x6 working -- seems to be a time bottleneck.
    Working on a better method for representing regions + handling interactions within regions.
  • Exit and start cannot be mid-segment
  • Local copy cannot show solution for set seed. All other 3 cases work.
  • Dots are not cancellable with negation -- Should be fixed / fixable with the region rewrite.
  • Self collision with start should have same spacing
  • Tracing quickly leads to one-frame bugs, probably to do with corner collision
  • Show solution doesn't round corners
  • Thursday puzzle style does not load solutions -- copying a region requires a call to _copyGrid, which is inaccessible on the thread. Look into fully deprecating.
  • Witness-style collision does not respect line & corner collisions - likely the cause of frame skips
  • Line break doesn't stop line
  • Firefox support
  • High puzzle failure rate for larger sizes (~80%), mostly due to number of impossible elements; stars and polys often are impossible.
    Fixed for stars, Poly solution seems to be 'remove discontinuous polys'
  • Top/left exits don't display properly
  • Hex SVG visible around line
  • Line doesn't smoothly transition from rect to fixed corner
  • Tracing in-game tends toward the corners, where pushing against an edge will translate 1/3 of your velocity perpendicular to the edge. Pushing against a cell pushes you toward the closer corner.
  • Tracing after show solution doesn't wipe shown solution
  • Poly full cancelling isn't working right now -- first is still pointing to 0,0 which won't cancel the region -- Note that if polys + negas = 0, then all cells MUST cancel, add boolean for this?
  • Solving a puzzle, then tracing a path leads to some odd behavior (? - was a regression)
  • Self collision should have spacing
  • Line breaks when exiting -- Still a minor bug with this somehow
  • Cursor not visible over start point
  • Start point doesn't draw when filling solution
  • Pixel separation while tracing (win10, chrome) pic
    Can't repro
  • High failure rate for random puzzles?
  • Tracing too fast can cause circle to 'break'
  • Exiting early can 'break' corners
  • Pixel border around start - related to pixel separation?

witness puzzle solver - solutions with out-of-bounds negative polyominoes not found

This puzzle solver tool is really cool! You mentioned in the discord you wanted bug reports; I'm not sure where to file them, so let me know if I should move this somewhere else.

Anyway, here's the bug. The following puzzle:

{"grid":[[false,false,false,false,false,false,false,false,false],[false,false,false,false,false,false,false,false,false],[false,false,false,false,false,false,false,false,false],[false,{"type":"ylop","color":"blue","polyshape":1,"rot":0},false,{"type":"poly","color":"yellow","polyshape":626,"rot":0},false,{"type":"poly","color":"yellow","polyshape":626,"rot":0},false,{"type":"ylop","color":"blue","polyshape":1,"rot":0},false],[false,false,false,false,false,false,false,false,false],[false,false,false,false,false,false,false,false,false],[false,false,false,false,false,false,false,false,false]],"start":{"x":6,"y":0},"end":{"x":0,"y":8},"dots":[],"gaps":[],"regionCache":{},"pillar":false,"name":"Unnamed Puzzle","valid":0,"negations":[]}

ought to have more solutions. For example, this solution should be valid:

screen shot 2018-08-12 at 06 42 22

It seems like the solver isn't considering the possibility that negative polyominoes could be placed out of bounds.

Cursor is very slow in Firefox

The cursor is extremely slow when using a Firefox based browser, to the point where it's unbearable to solve any puzzle. This issue does not present in Chromium browsers. The video demonstrates the issue.

2023-12-27.03-59-21.mp4

I've noticed that by using inspect element, and increasing the limit of the mouse speed to 5.0, the cursor moves at the same speed as the default value in Chromium, which may serve as a temporary solution while the cursor movement logic is properly fixed for Firefox.

Feature list

  • Point class? Should have no effect on the code base but may make life easier in the future. Constructor should take an object which has x and y defined, should be easier
  • Region checking is being too generous. It should return: An array of bitmasks for each row, and a list of elements. Should improve cache lookups and validation time.
  • Related, validate does not need element locations, just a list of elements (and their validity/color... think)
    This seems not quite correct. But I still think the reformatting is worthwhile, and I might be able to make this optimization in the future.
    Probably, validate should be cognizant of the inner workings of Region (and it'll be moved there eventually) so it can operate in much the same way it did before (except that gaps + dots should move into regionCheck)
  • Validate is being too generous. It should only pass into negation elements which were wrong (or could potentially be wrong) ED: It should pass all elements, but negation should be smarter about the order in which they are handled.
    Similarly, negation should be more aggressive -- triangles, dots, (colored objects) (polyominos) is the negation ordering. If there is an invalid triangle and no negations remaining, fail. Polycount also must be evened out, this should be a simple check. I may want to break this out of the polyFit logic?
  • Size choices / difficulty -> Daily puzzle styles (and colors?), e.g. monday is stars & squares [WIP]
  • Local storage to save completion count, sensitivity, hint/solution usage
    Local storage active, warning in place. Only saving sensitivity right now. I think I should save all puzzle info (id & style, date, time to completion, hint/solution used)
    Outright telemetry may be more worth my time, but requires a real server...
  • Puzzle objects should encapsulate their colors, along with things like regionCheck -- this brings it in line with regionCache.
    Partial encapsulation done, should finish deprecation before implementing more. This will also integrate with Region object encapsulation.
  • Flash for errors (and 2-stage negation) -- Validate should stop returning true/false, and instead return a list of invalid elements. If the list has size 0, then the region was valid. This may break region encapsulation slightly, since the elements' positions need to be known. (Could recompute?)
  • Alternate style
  • Mobile support via tap and drag, allow puzzle resuming from the trace element
  • Custom cursor (should be able to use SVG for this, if not a static PNG copy will do)
  • Symmetry (and colored dots)
  • Corner gaps
  • Puzzle rotation via CSS rotate animation
  • Don't require display() to serialize the puzzle -- instead, serialize the puzzle into the onClick
  • Sensitivity slider
  • Witness-style tracing
  • Daily emails (and associated email account)
  • Unique solutions -> Not actually that useful
  • (working) Hint and Solution buttons -> Pick random solution / pick breaks
  • If possible, make hint break invalidate current path (for a better hint)
  • Negation polyominos
  • Add pentominos
  • Triangles
  • Loading bar (to minimize the time of 5x5)
    Implemented async draw instead, much more effective. 5x5 is still slow.
  • Rotatable polyominos
  • Colored negation
  • Migrate colors into styles -- may not work due to firefox, maybe just migrate into utilities?
  • Real game colors
  • Pillar puzzles
  • Start only placable in a corner
  • Try caching all possible solutions to save time This is not what costs time
  • Allow all end placements
  • Rotatable negation polyominos
  • Links
    • Email list
    • RSS Feed
    • Bookmark?
    • Source Code
    • Report a bug
    • Export to windmill
    • Copy/share link?
    • Tutorial for elements + design choices
  • Create your own puzzle
    Should make sure polyominos can be self-encapsulated, e.g. custom polys
    Need to make sure export to windmill works, I don't want to host a server
    Think very carefully about UI

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.