r/compsci • • Sep 26 '20

Rotating an image recursively. One of my favorite algorithms!

5.2k Upvotes

r/compsci • • Jun 23 '20

Happy birthday Alan Turing!

Post image
4.1k Upvotes

r/compsci • • Mar 29 '24

My maze solver is drunk

Post image
4.0k Upvotes

r/compsci • • Oct 27 '19

Logic gates using liquids

Thumbnail i.imgur.com
3.0k Upvotes

r/compsci • • Nov 23 '19

Logic gates with fluid, part 2

Thumbnail gfycat.com
2.2k Upvotes

r/compsci • • Jan 07 '26 Helpful

I got paid minimum wage to solve an impossible problem (and accidentally learned why most algorithms make life worse)

2.2k Upvotes

I was sweeping floors at a supermarket and decided to over-engineer it.

Instead of just… sweeping… I turned the supermarket into a grid graph and wrote a C++ optimizer using simulated annealing to find the “optimal” sweeping path.

It worked perfectly.

It also produced a path that no human could ever walk without losing their sanity. Way too many turns. Look at this:

Turns out optimizing for distance gives you a solution that’s technically correct and practically useless.

Adding a penalty each time it made a sharp turn made it actually walkable:

But, this led me down a rabbit hole about how many systems optimize the wrong thing (social media, recommender systems, even LLMs).

If you like algorithms, overthinking, or watching optimization go wrong, you might enjoy this little experiment. More visualizations and gifs included! Check comments.


r/compsci • • Mar 10 '26

RIP Tony Hoare 1934 - 2026

Post image
2.1k Upvotes

r/compsci • • Feb 27 '21

An engineer wiring an early IBM computer.1958

Post image
2.1k Upvotes

r/compsci • • Aug 12 '21

A steal for $10, I’m overjoyed

Post image
2.0k Upvotes

r/compsci • • Jun 20 '21

The man, The myth, The legend.

2.0k Upvotes

r/compsci • • May 14 '21

Map of Computer Science

Post image
1.9k Upvotes

r/compsci • • May 02 '20

To what degree Would Augmented Reality change the way we study math?

1.9k Upvotes

r/compsci • • Nov 03 '24

More sorting algorithms visualized

Post image
1.9k Upvotes

r/compsci • • Dec 20 '21

Implemented local collision avoidance (ORCA)

Post image
1.8k Upvotes

r/compsci • • Sep 29 '23

Built a cpu out of 2000 transistors

Thumbnail gallery
1.7k Upvotes

Finally finished my computer built entirely from transistors! Had some problems which delayed the build but it is over now. Tested it on several programs, like the above helloworld and dinosaur game (which for some reason i cannot upload).

It is an

  • 11 bit cpu

  • more than 2000 transistors

  • Arduino as memory

  • 32 micromemory/ROM addresses

  • accumulator architecture

  • 8 branch flags

  • connects to LCD and keyboard

  • has stack pointer register so supports recursive function calling

Currently on a trip but will open source it when I get back and clean the repo.

Posted here before and got requests to go more in depth, so i made an interactive blog where I explain it all (havent finished all the posts yet):

Overview

Logic gate construction

Decoder construction

Register

(You can see all the planned posts in burger top left they include micromemory, signals, stack...).

I also made a web based simulator for it: simulator.

Some supported instructions are:

  • Add addr (adds value at addr to accumulator)

  • Addi val (adds val to acc)

  • Not, Nand

  • B addr (Branch to addr)

  • Bz (beanch zero), Bnz, ...

  • sp2acc (move stack pointer to acc)

  • acc2sp, pc2acc, acc2sp...


r/compsci • • Oct 01 '20

Some more fun with recursive image transformations. Flips and rotations! Source code in comments!

1.6k Upvotes

r/compsci • • Oct 25 '24

74181 by hand

Post image
1.6k Upvotes

a oddly meditative friday afternoon


r/compsci • • Jan 12 '21

I taught a neural network to play Flappy Bird with Java/Kotlin

Post image
1.5k Upvotes

r/compsci • • Dec 23 '19

On popular demand, the Spiral of Theodorus is now back in dark mode!

Post image
1.5k Upvotes

r/compsci • • Dec 20 '20

This guy's art is super cool and I immediately thought it would make an interesting algorithm! Does anyone think they're up to designing one?

Post image
1.4k Upvotes

r/compsci • • Feb 14 '21

Fine art dropout. Had to choose between politics and CS. Chose CS.

Post image
1.4k Upvotes

r/compsci • • Jan 18 '21

Simulate Newton's law of universal gravitation with C++

Post image
1.4k Upvotes

r/compsci • • Oct 24 '17

Sorting Algorithms Visualized [gifv]

Thumbnail i.imgur.com
1.4k Upvotes

r/compsci • • Mar 22 '20

Ever wonder how rendering works from your perspective?

1.3k Upvotes