Hello,Rhem3 is a puzzle game for pc. One of the puzzles is matching a sequence of tones. The matching is based on the duration of each tone. My old ears were having a hard time making the fine distinction that was needed. NXT and the sound sensor to the rescue! A 20 line program was all it took. It waits for an initial sound to trigger it and then graphs the volume and duration on the display. Each pixel along the horizontal axis was 30 milliseconds (3 seconds total). Armed with these graphs it was easy to make the matches and solve the puzzle. There were 8 sequences of 3 tones each. Sad to say, before using the NXT, I didn't have a single one correct.This might represent the most practical use I've ever had for my NXT.My son considered it cheating, but I considered it clever (in my humble opinion).

Dave

_________________Dad (Dave) and Adam

Fri Jan 13, 2012 8:16 pm

MHTS

Guru

Joined: Sun Nov 15, 2009 5:46 amPosts: 1523

Re: Solving puzzle in Rhem3 with sound sensor

I wrote a program to solve Sudoku using rule-base algorithms, not brute force trying all possibilities. My kids said I am cheating too. But my response is: hey computer is dumb, I gave it the intelligence to solve the puzzle, so it is really me solving it (but faster)! But because of it's rule-based, I did not implment all the rules in the world, so my program can only solve about 80+ percent of all the test cases I fed it. Some rules are really hard to implement. In time, I may slowly implement the harder rules.

Fri Jan 13, 2012 9:37 pm

magicode

Moderator

Joined: Tue Sep 14, 2010 9:19 pmPosts: 496

Re: Solving puzzle in Rhem3 with sound sensor

Though not ROBOTC, I made a rubik's cube solving program in high school to win a competition (it was friendly, so I didn't cheat or anything). I've always wanted to make a lego robot to actually solve a cube, but I've never had enough parts at the right time.

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum