Results 1 to 10 of 36

Thread: Grayout -Simple Linux freeware game

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Thanks for the offer to help SilverWarior. So far I'm still making progress, but nothing to show today. Hopefully later this week, or perhaps next week. I can mention already now that the two algorithms are not equally effective, on average, and they both can be beaten by a human intelligence. Not surprisingly. But one has to start somewhere.


    I'm not visiting StackOverflow often but occasionally search engines send me there when searching for solutions to some problem or some notation I've forgotten. Now when you mention it I do have a beginners pascal book. The one I got with Delphi 3. It's still on a shelf somewhere. Though I don't think there were much about classes there. I'll ask you instead if I ever start dipping my toes in the classes. I can't comment on other fora but I really like it here in PGD forum.

  2. #2
    Progress slowing down. Got problems with the algorightmic solution. Made a workaround fix. Showed the animated gif in the discord.

  3. #3
    After looking at animation I'm guessing you are not counting the blocks that could be freed up in next move incorrectly. To me it seems that you are counting the number of faces that will border with the grayed out area after each move. but this is incorrect because you can clear several blocks surrounding one single block exposing multiple of its faces. So for instance if you clear other blocs on Northern, Eastern and Western side of one block you expose three faces of this one block. You should count this block only once. So in other words you would need a mechanism that will track which blocks you have already counted so you don't count them multiple times.

    Again this is just my guess based on observing your Algorithm progress through the board.

  4. #4
    That algorithm is not very efficient but at least it solves the pattern. I may have messed up the loop somewhere but the idea was to turn the maximum numbers of sqares each time.


    I'll upload a second algorithm to discord. It's supposed to maximize distance instead of area and tends to perform better for most patterns. Eventually there may be some combination of the two approaches.


    This is all work in progress now and the program is currently an aestethic mess. I'm afraid it won't be finished this week either. I'm still working on it.

  5. #5
    Quote Originally Posted by Jonax View Post
    I may have messed up the loop somewhere but the idea was to turn the maximum numbers of sqares each time.
    If the idea is to turn the maximum numbers of squares each time then you have a bug somewhere. While it seems to work like this in the start it fails to do so toward the end of provided animation.

  6. #6
    Quote Originally Posted by SilverWarior View Post
    If the idea is to turn the maximum numbers of squares each time then you have a bug somewhere. While it seems to work like this in the start it fails to do so toward the end of provided animation.
    Yeah, I may have a bug somewhere, happens a lot for me unfortunately. There are two provided animations. The first I may have messed up is supposed to be max turned squares per move. The second animation is supposed to make maxium advance towards other side per move, that later algo tends to solve the patterns faster. But no doubt not as fast as the unknown optimum solution. Unfortunately I'm kind of stuck now. Got to have some coffee and try again later.

    Happy Weekend!
    Last edited by Jonax; 19-03-2022 at 04:15 PM.

  7. #7

    Update

    Hi guys!

    After some polishing the updated Grayout program is completed. Now always solvable becuase the available number of steps are given by a new non optimized algorithm. In most cases you can probably beat that algorithm. I hope this will be the final version but one never knows what new issues may come up.

    The Linux (Debian) version can be downloaded from:

    https://www.jonax.se/downloads.php

    And below is the animated gif. Thanks to SilverWarior for help.



Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •