Rubicon Forum
Welcome, Guest. Please login or register.
February 07, 2012, 05:44:24 AM

Login with username, password and session length
Search:     Advanced search
Undeletable components are now shaded blue when loading a level in.
4997 Posts in 231 Topics by 2427 Members
Latest Member: lightOfDay
* Home Help Search Login Register
+  Rubicon Forum
|-+  Playing the Game
| |-+  Open Design Challenges (Moderator: Bucky)
| | |-+  Challange: Count number of boxes of each type
« previous next »
Pages: [1] Print
Author Topic: Challange: Count number of boxes of each type  (Read 2737 times)
Daniel Nilsson
Designer
***
Posts: 55


View Profile
Challange: Count number of boxes of each type
« on: October 12, 2006, 11:05:35 PM »

I have made a machine to solve this problem but I challenge everyone to try to solve it too before I post my solution.

Input: A stream of random boxes.
Output: 16 counters, one for each type of box.

The machine should be able to count more than 16 boxes of each type (mine goes to 255). There are no timing constraints, you can feed new boxes to the machine as slow as you want (I do 4 cycles per box, but I think it could handle one box every other cycle).

Good luck!
Logged
krajzega
Operator
**
Posts: 11


View Profile
Re: Challange: Count number of boxes of each type
« Reply #1 on: October 13, 2006, 11:28:52 PM »

I don't know about handling a crate every other cycle - I can't make the dozers deliver less than two-cycle gaps between crates. My counters can handle full speed though, with no gaps between inputs. The problems lies with the pipes and dozers.

The solution is at fusydis. It might be a bit buggy, I didn't really check the thing after all the copy-pasting. Just left it running for a while, and it seemed to give plausible results. Now it's time to see yours Wink.

The counters are on the hazard tiles, with more significant digits on the right. The layout of the counters themselves is as follows:
Code:
37BF
26AE
159D
048C
« Last Edit: October 15, 2006, 06:53:30 AM by krajzega » Logged
sluutthefeared
Designer
***
Posts: 74


View Profile
Re: Challange: Count number of boxes of each type
« Reply #2 on: October 14, 2006, 02:24:13 AM »

I was doing the carry a bit differently so my counters weren't quite compact enough to fit in all 16 blocks. So I took the basic counters from yours krajzega and used a different way to feed them numbers so it would be full speed.
zimasat
The counters have a crate in their section to signify what's being counted, and like yours the hazard symbols are the counts with most significant digit to the right.
« Last Edit: October 14, 2006, 09:20:45 PM by sluutthefeared » Logged
krajzega
Operator
**
Posts: 11


View Profile
a
« Reply #3 on: October 14, 2006, 10:10:27 AM »

Very nice, I wouldn't think of the pipe/adder/copier trick for sorting the blocks. I'll remember that just in case I would need it somewhere else Wink.

I must admit that I concentrated on creating a compact full-speed counter, and didn't put that much thought in the design of the whole machine - just enough to make it work. I'm wondering how the counters in the original poster's solution work, and if they are any similar to mine.
Logged
Daniel Nilsson
Designer
***
Posts: 55


View Profile
Re: Challange: Count number of boxes of each type
« Reply #4 on: October 16, 2006, 09:30:19 PM »

Wow, those are nice machines! I specially like sluutthefeared's full speed sorting. Both of the solutions posted so far have much nicer sorting than my solution. I started by making the counter and added the sorting in an ad-hoc fashion later. My machine that started this challenge can be seen at doxumib. Note that the digits in the counters are in natural order (least significant to the right). The counter are also easy to extend to more digits and are very compact, 6 tiles high (but can be be packed with one tile overlap) and 3 tile wide per digit.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Rubicon Forum | Powered by SMF 1.0.8.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!