Results 1 to 10 of 36

Thread: Grayout -Simple Linux freeware game

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Cool

    Classes. I'm still not friend with these. Though I can see the use for them. I'm glad to hear you are doing well with the classes.

    Anyway. I'm working on the machine solution update for the grayout program. Nothing to show today, despite me saying this type of program is quick to finish. Hopefully sometime next week. The plan is to have on or two algorithmic naive solutions, at least as allowed number of moves, and the challenge for the player is to do better. We will see. And discord friendship request arrived and accepted.
    Last edited by Jonax; 13-03-2022 at 09:16 PM. Reason: Typo

  2. #2
    Quote Originally Posted by Jonax View Post
    Classes. I'm still not friend with these. Though I can see the use for them. I'm glad to hear you are doing well with the classes.
    If you have any question in this area don't be afraid to ask. Unlike many Stack Overflow users I won't just tell you to go and read some pascal beginner book. While that may be a perfectly valid suggestion for long time. Giving such answer to a newbie is just a motivational killer and thus makes more harm than good. I know this from experience since I revived this kind of answers on various forums many times. Well not here on PGD. Which is why I'm regularly visiting PGD almost every day for years now.

    Quote Originally Posted by Jonax View Post
    The plan is to have on or two algorithmic naive solutions, at least as allowed number of moves, and the challenge for the player is to do better.
    I'm looking forward of seeing your solutions.
    If you hit a snag don't be afraid to ask for help. If you ask nicely I may even be convinced to install Lazarus again on my computer so I could test your code directly if the need arises.

  3. #3
    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.

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

  5. #5
    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.

  6. #6
    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.

  7. #7
    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.

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
  •