
1. Re: Add em up game algorithm challange
gimbal2 May 7, 2014 7:33 AM (in response to badmash)1 person found this helpfulSorry, I'd have to do the same as you've been doing: pencil and paper and think think think. I'm not going to do that, the part you're trying to skip out on right now is the most important learning phase of this project. I suggest you take a break and let the problem go for a while. I'm sure the next time you're on the toilet an idea will pop into your head. That's the way it goes in the wonderful world of programming  its not about being able to come up with solutions on the spot, its about managing frustration when you're stuck.
The last thing you want to be doing is tossing in the towel, going to a forum and have yourself told how you should have done it yourself  you'll never have a good feeling about finishing this project then. Please, do everything in your (will) power to crack this one yourself.

2. Re: Add em up game algorithm challange
badmash May 7, 2014 8:25 PM (in response to gimbal2)gimbal2...how did you manage to crack the algorithm? can you give me some tips? i think i am approaching it the wrong way (work ethic)...so here is what i am doing:
paper pencil: drew the grid on the paper, numbered the coordinates, now i am trying to create a formula that will relate the queue numbers to the grid...so first, I need to get the coordinates of all the empty boxes (easy)...then i need to select the first empty space and see if the queue number will fit there...if not then move on to next empty space...if the queue number fits there (the surrounding numbers will disappear) ..then i need to get the coordinates of the empty cells again since the number of empty cells changed..and basically repeat this process...
but the problem arises when a number doesn't fit in any empty space...then i need to get a number from the queue such that this number when placed in a empty space will create an opportunity for the next number in queue to fit in another empty cell close by....that is the part i am struggling with...
The project is due next week, but I don't really care, i mean i can get over 60 percent with what i have at the moment, according to my TA.
But i need to solve this in my lifetime or I will go insane!!!!
TIME TO VISIT THE THINKING PAD! (THE TOILET)

3. Re: Add em up game algorithm challange
rp0428 May 8, 2014 12:45 AM (in response to badmash)And the first half of your post just HAPPENS to be about 100% IDENTICAL to this post from almost 5 years ago?
http://forums.iransportspress.com/archive/index.php/t56646.html
shawshank 09042009, 05:21 PM
Ok, we have this project where we have to code this game:
http://www.mathsisfun.com/games/addemup.html
The point of the game is to place numbers in empty boxes in a 2D array of numbers such that the the 8 surrounding positions when added have the number in the middle as the last digit of the sum.
Here is an example:
1 2 3
4  4
5 5 4
the sum of those numbers is 1+2+3+4+4+5+5+4=28. Since 8 is the last digit of 28, then putting an eight in the middle would make all boxes around it become empty. Anything else and the number is just placed in the empty box (for example if u put 7 there).
Also, you have a que of numbers which is equal to the number of rows of the board. 
4. Re: Add em up game algorithm challange
badmash May 8, 2014 5:03 AM (in response to rp0428)Yea, I was searching Google and came across that post, this person got the same project as me. So I just copied the project description from there...too lazy to type lol.

5. Re: Add em up game algorithm challange
jwenting May 9, 2014 6:29 AM (in response to badmash)and THAT is your job, to "crack the algorithm".

6. Re: Add em up game algorithm challange
gimbal2 May 9, 2014 7:02 AM (in response to jwenting)jwenting wrote:
and THAT is your job, to "crack the algorithm".
It is? I thought we were getting paid to drink coffee, make crude jokes and hang around in forums all day?

7. Re: Add em up game algorithm challange
jwenting May 9, 2014 10:11 AM (in response to gimbal2)so that's why you're so chipper all day!
They never told me anything about getting paid for this...

8. Re: Add em up game algorithm challange
jwenting May 9, 2014 10:13 AM (in response to badmash)if you're too lazy to type, why should we not be too lazy to do your homework for you?

9. Re: Add em up game algorithm challange
badmash May 10, 2014 12:41 AM (in response to jwenting)jwenting, it was just a project description I copied because it is the same project that person had, defeats the purpose of me writing down a brand new description.
All I was asking for was a guidance into HOW to crack the algorithm, as I though I was approaching it wrong. Nevertheless, i got it to solve the puzzle, now I am working on to find the optimal solution. Thanks for your USELESS comment about NOTHING.