From 94cd003e964658f2f0a46036244e28b3f9404b8a Mon Sep 17 00:00:00 2001 From: Connor Date: Fri, 6 Feb 2026 12:07:33 +0900 Subject: [PATCH] removed prompts --- prompts/1-2DSimple | 3 -- prompts/10-bit-container | 10 ------- prompts/2-sudoku | 1 - prompts/3-nonogram | 1 - prompts/4-abstract-wfc | 46 ------------------------------ prompts/5-allocator | 1 - prompts/6-console-renderer | 1 - prompts/8-random-selector | 5 ---- prompts/9-weighted-random-selector | 10 ------- 9 files changed, 78 deletions(-) delete mode 100644 prompts/1-2DSimple delete mode 100644 prompts/10-bit-container delete mode 100644 prompts/2-sudoku delete mode 100644 prompts/3-nonogram delete mode 100644 prompts/4-abstract-wfc delete mode 100644 prompts/5-allocator delete mode 100644 prompts/6-console-renderer delete mode 100644 prompts/8-random-selector delete mode 100644 prompts/9-weighted-random-selector diff --git a/prompts/1-2DSimple b/prompts/1-2DSimple deleted file mode 100644 index 2cab026..0000000 --- a/prompts/1-2DSimple +++ /dev/null @@ -1,3 +0,0 @@ -This is the start of a high performant c++ Wave Function Collapse repo for n-dimensions. To increase performance we want to avoid using a large memory footprint, virtual polymoprhism, etc. - -For now we want to make it possible to use and test WFC with 2 dimensions, but later on we'll want to use 3D or even 4D. Please implement the algorithm with 2 dimensions for now. use the console for outputting tests. \ No newline at end of file diff --git a/prompts/10-bit-container b/prompts/10-bit-container deleted file mode 100644 index 4532a9a..0000000 --- a/prompts/10-bit-container +++ /dev/null @@ -1,10 +0,0 @@ -We're using c++20, I want you to create a file wfc_bit_container.hpp in include\nd-wfc which contains a templated class whose goal is to minimize the amount of bits we use for masking. The template type should be a number (The number of bits stored) and should have the Size of the container (how many of these integers should we store). The size is 0 by default, which means it's resizable and it should use an std::vector instead of an std::array. -examples of given parameters: -- Bits: 2; Size: 8; -> 2 requires 2 bits, std::array -- Bits: 3; size: 4; -> 3 requires 4 bits, std::array -- Bits: 0; size 128; -> 0*128 == 0; std::array -- Bits: 32; size: 100; -> std::array -- Bits: 256; size: 0; -> std::vector -Make sure that the amount of bits used is a power of 2: 0, 1, 2, 4, 8, 16, 32, 64. If more than 64 bits are required, make sure it is a multiple of 64: 64, 128, 196, 256, etc. -We should be able to get/set values with an index, do bit operations like |, &, ^ on individual elements, do std::countl_zero, std::countl_one, std::countr_zero, std::countr_one & std::popcount. -This repo tries to be as optimized as possible. Make good use of `asserts` instead of `if conditions` wherever you are checking something. \ No newline at end of file diff --git a/prompts/2-sudoku b/prompts/2-sudoku deleted file mode 100644 index 3987a53..0000000 --- a/prompts/2-sudoku +++ /dev/null @@ -1 +0,0 @@ -Can you make a fast sudoku loader and solution validator in demos/sudoku/. make sure to use as little memory as possible for the sudoku class and validator \ No newline at end of file diff --git a/prompts/3-nonogram b/prompts/3-nonogram deleted file mode 100644 index 03c2466..0000000 --- a/prompts/3-nonogram +++ /dev/null @@ -1 +0,0 @@ -inside the demos/nonogram directory, please implement a nonogram loader that stores the nonogram solution and instructions in a seperate class. Use as little memory as possible for storing the solution and instructions. Only store important info, we don't need the name of the author. \ No newline at end of file diff --git a/prompts/4-abstract-wfc b/prompts/4-abstract-wfc deleted file mode 100644 index 8eccdd5..0000000 --- a/prompts/4-abstract-wfc +++ /dev/null @@ -1,46 +0,0 @@ -In this repo I want you to implement a templated Wave Function Collapse engine that would be compatible with 2D grids, 3D grids, Sudoku, Picross, etc. -I want the following to be possible: - -WFC::Builder() - .variable(name/id/userdata, ...).constrains([](World& world, int worldID, Constrainer& constrainer, name/id/userdata){ constrainer.constrain(world.getid(...)); }) - .variable(...) - -The World is responsible for giving its size and giving ids. the ids should all fit in the size of the world. -when setting the variable on a node/cell, it should call the lambda to constrain the rest of the unknown nodes/cells. -The WFC should have no concept of coordinate systems. The WFC algorithm should be able to work even without coordinates, and just with a graph for example. - -sudoku eg: -WFC::Builder>() - .variable(1,2,3,4,5,6,7,8,9).constrains([](Array2D& world, int worldID, Constrainer& constrainer, uint8_t var) - { - int [x,y] = world.getCoord(worldID); - - for (int i{}; i < 9; ++i) - { - constrainer.constrain(9 * y + i, var); - constrainer.constrain(i * y + x, var); - // TODO add small square constraint - } - }) - -2D tilemap eg: -WFC::Builder>() - .variable(SEA).constrains([](Array2D& world, int worldID, Constrainer& constrainer, uint8_t var) - { - int [x,y] = world.getCoord(worldID); - - constrainer.only(y*100 + x - 1, SEA, BEACH); - constrainer.only(y*99 + x, SEA, BEACH); - constrainer.only(x*101 + x, SEA, BEACH); - constrainer.only(x*100 + x + 1, SEA, BEACH); - }) - .variable(BEACH).constrains([](Array2D& world, int worldID, Constrainer& constrainer, uint8_t var) - { - int [x,y] = world.getCoord(worldID); - - constrainer.only(y*100 + x - 1, SEA, LAND); - constrainer.only(y*99 + x, SEA, LAND); - constrainer.only(x*101 + x, SEA, LAND); - constrainer.only(x*100 + x + 1, SEA, LAND); - }) - ... \ No newline at end of file diff --git a/prompts/5-allocator b/prompts/5-allocator deleted file mode 100644 index cfce194..0000000 --- a/prompts/5-allocator +++ /dev/null @@ -1 +0,0 @@ -This is a repo for Wafe Function Collapse. The logic is already implemented. There is branching logic that creates a new state and allocates a lot of memory. I want you to create an "stack" allocator specifically for the wfc algorithm that the program can use to quickly allocate new branches. The deallocation should only occur when a branch goes out of scope, so no need to have logic in the deallocate() function. \ No newline at end of file diff --git a/prompts/6-console-renderer b/prompts/6-console-renderer deleted file mode 100644 index 38b212e..0000000 --- a/prompts/6-console-renderer +++ /dev/null @@ -1 +0,0 @@ -I want you to create code files in the demos/ directory that helps with console rendering. I want to be able to render the sudoku and nonogram demos that I have right now, but also have them solved in real time without adding new lines to the console. Test out your solution by rendering a sudoku puzzle. Give a clear API to render the state of the existing Sudoku class. Make sure you first allocate enough space in the console before rendering anything. So first add some empty lines before the rendering. \ No newline at end of file diff --git a/prompts/8-random-selector b/prompts/8-random-selector deleted file mode 100644 index ebaf03a..0000000 --- a/prompts/8-random-selector +++ /dev/null @@ -1,5 +0,0 @@ -in wfc.hpp I want you to implement a way for the user to customize the way random cells are picked in the Branch function. Right now it just uses uniform_int_distribution and mt19937 to generate random indices, but I want the user to be able to supply their own functions and data using lambdas. -The lambda should be supplied an std::span of possible cell values and should return the index. -Test this by making a default randomization function a constexpr simple seed randomizer using a mutable lambda to change the seed. -Add a more advanced one that uses the uniform_int_distribution and mt19937 implementation that is currently in use. -The goal of this project is to be able to use the wfc algorithm at compile time, to be able to solve sudokus at compile time. So make sure its constexpr friendly. \ No newline at end of file diff --git a/prompts/9-weighted-random-selector b/prompts/9-weighted-random-selector deleted file mode 100644 index 986e0f6..0000000 --- a/prompts/9-weighted-random-selector +++ /dev/null @@ -1,10 +0,0 @@ -in wfc.hpp there are 2 random selector structs. I want you to create another one that can be used to give weights to values. -use 16-bit for the individual weights for each value. The weights should work at compile time. -The WeightedSelector is a RandomSelector that uses another random selector as a backend. -example of how the weights should work: -Builder:: - ::DefineIDs<...> - ::DefinedConstrainer<...> - ::SetRandomSelector<...> - ::Weights, Weight, ...> - ::Build \ No newline at end of file