For challenges involving simulation.

learn more… | top users | synonyms

15
votes
6answers
1k views

Predict where the man will go

A man lives in the north-west corner (0, 0) of a town with height h and width w . Everyday he walks from his home to the border (?, w) or (h, ?). In the following example, the man goes to (3, 3) ...
15
votes
10answers
1k views

Simulate a battle between two creatures

Welcome, brave code golfer! Today you will stand in the midst of a great battle between a goblin and an elf! goblin attacks elf! elf dodges! elf attacks goblin!     elf hits goblin for 13 ...
5
votes
2answers
427 views

Code Golf: What is the spaceship's fate? [floating point version]

This question is slightly harder than the ASCII art version. There is no art, and now you get to do some floating point arithmetic! The Challenge The U.S.S. StackExchange was traveling through the ...
6
votes
1answer
652 views

Simulate a (gravity-based) billiard-ball-type computer

The Machine A billiard-ball type machine is composed of only the symbols \ _ / along with upper- and lower-case letters, spaces, and the number 1. \ and / are ramps. A ball coming from above will be ...
15
votes
3answers
2k views

The strange life of a beehive

Researchers recently discovered an interesting bee colony that lives in an infinite field of honeycomb: Each cell can house a bee or not. In fact, the lives of those creatures appear to be a bit ...
12
votes
5answers
1k views

Code-Golf: Lights Off!

The shortest code to pass all possibilities wins Many grid based games have been made that start off with a grid of lights that are switched on. Pressing any of the lights causes that light and the ...