Results 1 to 3 of 3

Thread: How to make Bejewled Blitz bot

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2012
    Posts
    14

    How to make Bejewled Blitz bot

    Hey

    I was watching this video of a bot made in Visual basic.

    http://www.youtube.com/watch?v=oFIGJVCpr5s

    What I would like to knw is how is this bot made? Is it through an image recognition? How does the program know when and where to click that? What kind of coding is used?

    Thanks

  2. #2
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: How to make Bejewled Blitz bot

    This is fun to speculate about. I can think of at least two ways.

    << 1 >>
    Bejewelled exposes and API that outputs game state data which can be used to determine what moves to make.

    << 2 >>
    He uses image recognition to compile his own state data. The key to this would be the fact that the board itself is of a fixed size and so are the jewels so you can very easily calculate the position of a specific jewel on the board. He would have to have a database of the images of every type of jewel in its rest state and since the size is fixed he could use a very simple byte by byte comparison between the images in the database and any jewel currently on the board. Each image in the database would have to have some kind of type ID so he can basically construct the board in memory using these IDs and have his AI use that data to calculate moves. Identical IDs would mean identical jewels in this case.

    Of these approaches, I favor the first one as the more clean one yet the more unlikely. The second is technically more challenging yet more likely. Id love to hear someone else speculate on the as well. Its an interesting question.

  3. #3
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,375

    Re: How to make Bejewled Blitz bot

    After reading the question, I did a google search. Apparently he was learning C# and made this program as sort of an intro to the language. If you notice in the very beginning he has his program over the actual game, that gets the position and ID of the jewels. From there its just math and see how much points you can rack up.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

Posting Permissions

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



Click Here to Expand Forum to Full Width