ah heck. i was looking through old text files and found an old semi-arbitrary problem i was trying to solve. now that i know how to solve it, i feel obliged to finish it even though it's pointless.

Follow

a possible excuse: it's another place i can try and test my bit-blaster with

actually i should use this as an excuse to learn how to use box-drawing characters programmatically. could come in real handy.

Show thread

the equations at the bottom don't actually work for other sizes
O WELL

Show thread

fixed those bugs and got hex distances working, plus i can now place text within the boxes. screenshot later i guess. now i can start on the solver stuff

Show thread

it's like a skill tree where you start in the center and there's constraints on the six corners for costs and total costs. it has 3-way rotational symmetry. and yeah, these squares would be rendered as hexagons outside of a terminal.

Show thread

also there's a constraint that the sum of all costs is 255. anyway i need to go to bed, maybe i'll try to make this easier to look at tomorrow

Show thread

i made a bunch of settings like optional stumps that are impassible

Show thread

long description 

Show thread

here's the code if you want to mess around. you'll also need to install picosat. eaguru.guru/t/hex_problem.py — cnf.py has the cleanest code, z0.py is okay, hex_problem.py is pretty sloppy.

Show thread

also you can set everything to 0 (except hexrad and maxcost) to remove their constraints

Show thread

i added rotation and mirroring but i haven't updated the links yet

Show thread

@notwa these are so pretty! i love a good optimization problem :)

Sign in to participate in the conversation
Cybrespace

Cybrespace is an instance of Mastodon, a social network based on open web protocols and free, open-source software. It is decentralized like e-mail.