This commit is contained in:
Miloslav Ciz 2024-04-03 22:57:42 +02:00
parent f8e54987d6
commit 5f4a7f55f9
11 changed files with 1742 additions and 1741 deletions

View file

@ -51,10 +51,11 @@ Here you will find suggestions for programming projects, roughly sorted by their
3. **[gopher](gopher.md) browser**: Write interactive gopher browser -- it can be a purely [command line](cli.md) browser. It has to be able to follow links and go back at least one page. The program must include some basic help and ability to save files to disk.
4. **simple text [compression](compression.md)**: Write a program that can compress and decompress plain [ASCII](ascii.md) text files using some very simple technique like [run length encoding](rle.md) (RLE) or dictionary methods (you can even use a fixed dictionary, e.g. have a list of common English words that you will represent by some shorter symbols). You can assume input characters will only have 7bit ASCII codes, so you can compress the text also by dropping the 8th unused bit. You don't have to achieve great compression ratio (you can even enlarge some files), but you must pass the following test: take the program's source code, this article's plain text and Wikipedia main page plain text, your program must compress at least two of these to a smaller size (and of course successfully decompress them into identical files). The program must work as a [filter](filter.md), i.e. it mustn't load the whole file into memory, it has to use approximately same amount of RAM for input of any size.
5. **stupid chatbot**: Make an entertaining chatbot that can react to basic sentences like "how are you?", "are you a robot?" and so on. It must give a human-like answer to at least 20 different sentences. It has to deal with typos and text variability a little bit and has to have some kind of memory (for example it can remember the name of its chatting partner). Test the bot by having it chat with itself.
6. **arbitrary size numbers**: Make a library that allows working with arbitrary size [fixed point](fixed_point.md) [numbers](number.md), i.e. you will provide a data type in which it is possible to store a binary number with any number of bits before and after the radix point -- size of the number will only be limited by amount of RAM your program can use. Each number will dynamically allocate as much memory as it needs. Additionally implement these operations with the numbers: converting to/from the language's native numbers (with rounding), printing and/or converting the number to string, addition, subtraction, multiplication and dividing.
6. **arbitrary size [rational numbers](rational_number.md)**: Make a library that allows working with arbitrary size rational numbers, i.e. represent each number as a pair of numerator and denominator, the number will be automatically allocating itself as much memory as it needs for storing the two numbers. It mustn't waste too much memory, i.e. whenever it changes, it will try to reallocate its memory and decrease its size if possible. Size of the number will only be limited by amount of RAM your program can use. Furthermore implement these operations with the numbers: converting to/from the language's native numbers (with rounding if necessary), comparisons (equal, greater, greater or equal, smaller, smaller or equal), addition, subtraction, multiplication, division and printing and/or converting the number to string (at least decimal -- if the number has infinitely many fractional digits, just cut it somewhere).
7. **image to [ASCII art](ascii_art.md)**: Make a program that takes an RGB bitmap image and renders it with ASCII characters (i.e. prints it out to console). You can support loading the image from just one file format of your choice, possibly something simple like PPM, BMP or Farbfeld. The program must support resizing the image and it must allow to just set one dimension with keeping the aspect ratio.
8. **educational [sorting](sorting.md) visualization**: Make a program for visualizing sorting algorithms -- it may draw real graphics (either directly to the screen or by outputting animation file) or just render ASCII art graphics, but it has to clearly show what the sorting algorithm is doing, i.e. which elements are being compared, which are swapped and if it makes good sense to highlight something else (like the pivot or already sorted part of the array), you should do it. Implement at least bubble sort, insertion sort, selection sort and quick sort. Also offer benchmark mode in which all algorithms race in sorting the same array (this can be without advanced visualization, just show e.g. number of steps for each).
9. **3D model of [fractal](fractal.md)**: Make a program that outputs 3D model of either Sieprinski triangle or Koch snowflake fractal. The output shall be some simple 3D format like obj or Collada. The model can be primitive, i.e. it can be just flat shape made of triangles which don't have to really be connected, but the program must allow specifying the number of iterations of the fractal (during invocation, e.g. as a CLI flag). Check that the model is correct by opening it in some 3D editor such as Blender.
10. **[sudoku](sudoku.md) solver**: Create a program to which the user somehow passes a sudoku puzzle (in a file, through a CLI flag, interactively... the choice is yours, but passing a new puzzle mustn't require program recompilation) and the program attempts to solve it. It must first employ some basic reasoning, at very least it has to repeatedly try the elimination method, i.e. marking a set of possible values in each empty square and then reducing these sets by crossing out values that can't be in that square because the same value is in its column/row/minisquare -- wherever only one value remains in the set, it is filled in as final; this has to be repeated until no more progress is being made. If you want, you can employ other techniques as well. After this if the puzzle is still not solved, the program will resort to [brute force](brute_force.md) which has to eventually lead to solution (even if it would take too long). If the program finds that the puzzle is unsolvable, it has to report it.
### Level 3: Hard, *Ultra Violence*
@ -77,7 +78,7 @@ Here you will find suggestions for programming projects, roughly sorted by their
4. **[Python](python.md)**: Implement the Python programming language, INCLUDING its whole standard library. Bonus points for finishing before the version you are implementing stops being supported.
5. **ruin [bitcoin](bitcoin.md)**: Make a program that can mine one bitcoin by running for at most one minute on some consumer laptop released before year 2010. Warning: this is probably unsolvable, but if you solve it you may help save the planet :P
TODO: text editor, tetris, voice synth?, snake, JPG like compression, quadratic equation, fractals, 2D raycasting, fourier transform, primes, image library, web browser, diff, MD parser, sudoku solver/generator, bytebeat, markov chain, syntax beautifier, grep, some kinda server, function plotter, raytracer, pi digits, 2D physics engine, encryption?, procedural MIDI, machine translation?, maze gen., genetic prog., language recognizer, search engine, AI?, chat ...
TODO: text editor, tetris, voice synth?, snake, JPG like compression, quadratic equation, fractals, 2D raycasting, fourier transform, primes, image library, web browser, diff, MD parser, solver/generator, bytebeat, markov chain, syntax beautifier, grep, some kinda server, function plotter, raytracer, pi digits, 2D physics engine, encryption?, procedural MIDI, machine translation?, maze gen., genetic prog., language recognizer, search engine, AI?, chat ...
## Quiz/Questions/Problems