Jump to content
BrainDen.com - Brain Teasers

groston

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by groston

  1. I have written a program that emulates the manner in which I manually solve these puzzles. The program works - but only most of the time (regardless of the size of the puzzle). Since there are some puzzles that I cannot solve, I have come up with the following 'reasons': There is some solving process that I have not yet discovered There is a bug in some of the puzzles making them not solvable. There was one puzzle, I believe Hard 283, that I was able to solve, but solving it took a fair amount of effort writing notes, etc - it was not fun. This makes me suspect that I am missing a solving process... Anyway, if you are an 'expert' at this game, or know someone who is, I would welcome the opportunity to communicate with you. Thanks.
  2. plasmid - Your observation is correct, with the added issue of having to select the first row from which to solve the puzzle manually. However, I suspect that by creating the AllSolutions structure, that multiple iterations should not be needed. However, as stated previously, there is a step/process missing from my solution. Also note that if the main algorithm were to be repeated again, I seriously doubt that the answer would change...
  3. Plasmid, Thanks for the reply. Please note that, at best, I am a hobbyist, so I am not sure if my code meets your need for ‘an algorithm’. I have attached my code – not too much of it. I have also attached the input file for a particular game. In this case, the game is from the cited app, difficulty ‘hard’, puzzle number 1. Here are some more comments about the code: Structure AllSolutions – a large array with every possible solution Structure gboard – an array the size of the puzzle that shows what is still there Description of code Lines 57-109: read in the input file, including the images and the rules Lines 111-152: configure both of the above arrays. Note that the arrows are for the display, nothing else Lines 155-285: execute a rule Lines 158-165: clean up the gboard array Lines 168-186: remove solutions that are not viable from the AllSolutions array Lines 189-198: rebuild the gboard array Lines 201-209: figure out how many viable solutions there are in each spot of the gboard array. Note that if there is a column with only one solution, that must be the solution in that column, so eliminate that item from other columns. Lines 213-284: Do the above and keep repeating as long as any changes to the board are made Lines 287-403: Display the board The issue that I am having is trying to figure out what part of the algorithm I am missing! The above approach, for the above problem, should have exactly six answers – one for each column (and the number of columns is the same as the number of items). With the above, I get 19 answers – what am I missing??? fMain.vb Hard01_Input.txt
  4. Just for fun, I have been trying, far less than successfully, to write a program to solve Einstein's Riddle Logic Puzzles, see https://play.google.com/store/apps/details?id=com.rottzgames.logic. I code the board as layers, columns, and items. Each rule is them translated into two layer/item pairs; for example, a textual rule can become 1C-4B. The program I have written properly executes all of the games ‘rules’ and it also looks for a single item on a layer and recognizes that that must be the item in the column in which it appears. In fact, for one super simple game, my program actually came up with the correct answer. However, as I try the more reasonable puzzles, the answer is not correct. For example, in the game Hard:#1, there are five layers and six items. Thus, a proper result would have just six ‘columns’ of results. However, the best I have been able to do is 19 columns (and in these 19 solutions are the correct six). I am clearly missing something to eliminate the extraneous 'solutions' (which are wrong!). I have looked over this particular game in great detail, but do not see any way to use an indirect approach to help eliminate some of the wrong answers. So, please, if you have any insights, algorithms, etc., please share. Please.
×
×
  • Create New...