Results 1 to 12 of 12

Thread: bejeweled solver

  1. #1
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    189
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default bejeweled solver

    i made a script that searches for the best possible move to do in a bejeweled game.
    the code is a bit messy, but it should work.

    explenation of how it works.
    first it wil start with indexing the field
    so it wil know where all the jewels are placed, and what kind of jewel each is.

    then it will search for all the moves that are possible, for each move it wil start the proces again it searches again for all the moves, he wil do this till he know al the possible combinations.
    it wil remember wich combination gave him the most opertuneties
    like:
    first it wil ave 3 moves.
    the first one gave him one other move and after that none.
    second one gave him 3 possible moves, after all thes moves there was only one left.
    the third move, only gives one move, but that move gives him 2 other moves, one of these wil end the game the other gave him another move, after this move he don't know how many moves he wil have, becaus he don't know what the jewels are that will fall.

    il put it in a tabel

    1. move1
      1. move1
        1. no more moves


    2. move2
      1. move1
        1. no more moves
      2. move2
        1. no more moves
      3. move3
        1. no more moves


    3. move3
      1. move1
        1. move1
          1. no more moves
        2. move2
          1. move1
            1. don't know what wil fall, but this one gives him the most opertunities


    so now it wil do move 3, this one gives him the most possible moves.
    when he did the move, this wil all start over.
    it does one move, searches again and find the best move for the field with the new fallen jewels.

    hope my english wasn't to bad:P
    We merely play "against the rules". We cheat. Thats what we are good at, thats what we do.
    http://www.frement.net/srl/simba_user4.png

  2. #2
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Which game do you suggest we use?

    ~Sandstorm

  3. #3
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    189
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    doesn't matter if you put the vars right, but this one is made for http://www.online-spellen.nl/game/Bejeweled.htm i thought
    We merely play "against the rules". We cheat. Thats what we are good at, thats what we do.
    http://www.frement.net/srl/simba_user4.png

  4. #4
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It doesn't work, it just continually clicks the first jewel. :/.

    ~Sandstorm

  5. #5
    Join Date
    Oct 2007
    Location
    The deep web
    Posts
    2,496
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    SCAR Code:
    Line 48: [Error] (48:11): Type mismatch in script C:\Documents and Settings\Jake\Local Settings\Temporary Internet Files\Content.IE5\QNBXXR30\bejeweled%20solver[1].scar
    i get this
    Did someone say GDK?

  6. #6
    Join Date
    Mar 2007
    Posts
    3,681
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Sandstorm View Post
    It doesn't work, it just continually clicks the first jewel. :/.

    ~Sandstorm
    +1

  7. #7
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    You forget some inttostr() in yur Writeln's
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  8. #8
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    He must be using SCAR 3.20+ which doesn't need string conversion functions.


  9. #9
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Cazax View Post
    He must be using SCAR 3.20+ which doesn't need string conversion functions.
    Wow, it does that automatically I havent used it yet.
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  10. #10
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    189
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    your right i got 3.20
    i will upload a new one
    We merely play "against the rules". We cheat. Thats what we are good at, thats what we do.
    http://www.frement.net/srl/simba_user4.png

  11. #11
    Join Date
    Jan 2010
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This did not work for me at facebook bejeweled blitz, it just keeps moving the mouse to the first jewel :S

  12. #12
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Nice effort.
    There used to be something meaningful here.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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