Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Fri Nov 22, 2024 4:34 am

All times are UTC




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Tetris Bot
Thanked: 0 time(s)  Unread post Posted: Fri Jul 02, 2010 12:24 pm 
Active User
Active User



Joined: Fri Jul 02, 2010 11:35 am
Posts: 36
Been thanked: 3 time(s)
Has thanked: 0 time(s)
Contribution Points: 37
Hello, I need help in making bot tetris. Who can help? :roll:
My point here is mainly how to make AI for the bot. To be able to know the location of all blocks, and he knew where to put the blocks.


Top
 Profile  
Reply with quote  
 Post subject: Re: Tetris Bot
Thanked: 0 time(s)  Unread post Posted: Fri Jul 02, 2010 12:28 pm 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4525
Been thanked: 1346 time(s)
Has thanked: 133 time(s)
Contribution Points: 33209
Id suggest you start out by posting some screendumps and link to the "specific" Tetris game you want to create a macro for.

Then figure out exactly what you need the macro to do, step by step.

When all of that is sorted, the next step, is to find out how to get Blue Eye to do it, which is where I will be able to help you getting started.

_________________
Blue Eye - Developer / Moderator
Code:
Gigus


Please read the rules about contribution points - click here

Do you know everything about BE, the forum, licenses and contribution points?
Please take a minute to read this introduction & guidelines.


Top
 Profile  
Reply with quote  
 Post subject: Re: Tetris Bot
Thanked: 0 time(s)  Unread post Posted: Fri Jul 02, 2010 12:48 pm 
Active User
Active User



Joined: Fri Jul 02, 2010 11:35 am
Posts: 36
Been thanked: 3 time(s)
Has thanked: 0 time(s)
Contribution Points: 37
This game look like: http://img685.imageshack.us/img685/7867/beztytuulhw.jpg
And if you could write a step by step at all I start doing?

Unfortunately I can not give you a link to this game because on this site, you must first register and the registration on this site that caused you trouble as it is in Polish website.


Top
 Profile  
Reply with quote  
 Post subject: Re: Tetris Bot
Thanked: 0 time(s)  Unread post Posted: Fri Jul 02, 2010 3:35 pm 
Lifetime VIP Contributor
Lifetime VIP Contributor
User avatar



Joined: Sat Apr 24, 2010 12:51 pm
Posts: 355
Location: Tallinn
Been thanked: 18 time(s)
Has thanked: 1 time(s)
Contribution Points: 4647
Matevos wrote:
This game look like: http://img685.imageshack.us/img685/7867/beztytuulhw.jpg
And if you could write a step by step at all I start doing?

Unfortunately I can not give you a link to this game because on this site, you must first register and the registration on this site that caused you trouble as it is in Polish website.


well... you can give the game name, im sure it is somewhere else also... just http://www.google.com...

2nd google chrome "the finest browser out there" will translate any page in any language :)

and 3rd to soud a bit funny, i can say you can start with "begin" :)
Code:
  begin
     Color.Flush screen dump cache()
     if  Color.At coordinate is (RGB)("R", "G", "B", "X", "Y")
          begin
some code here to think
end
if  Color.At coordinate is (RGB)("R", "G", "B", "X", "Y")
          begin
same code here
end
 end       



but i noticed that all the same type of blocks are same colour, so that helps a bit

the get the RGB values, and X Y open investigator and press prting scr or ctrl+s
now if you look at the investigator, you can get "next block" X and Y cords from the up right and also, the RGB of that coordinate

ps! the section "some code here" will be filled by gigus i suppose, since i think hes the only one to make code to record the blocks spacement bottom, and where to put the next block

_________________
Full time IT student/worker - BE showed me the way, so may the code be with you all!
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Tetris Bot
Thanked: 0 time(s)  Unread post Posted: Fri Jul 02, 2010 3:47 pm 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4525
Been thanked: 1346 time(s)
Has thanked: 133 time(s)
Contribution Points: 33209
hehe, thank you for the input BakT ;)
btw, @BakT, I looked in to a new feature I just might implement in the next version of Blue Eye, to make our "Black/Orange balls" -bot a lot faster and better :)

Matevos,

Perhaps the easiest way would be to find a Tetris game as similar as possible to this one, only one that is anonymously accessible, then it would always be quite easy to change the Tetris macro to fit a different but similar game (Tetris on another site).

To improve your chances of getting useful help here on the forum, its probably best if the game is accessible, simply by following a link.

In any event, if you create some screen-dumps (you may use the Investigator, to extract just portions of the screen) and attach them to a post here, and then start going through the logic required (in a non-technical way, but purely logical) then ill do my best to help you turning that in to executable code in Blue Eye.

Surely this is possible, but its a big task, like I also mentioned in the post you initially posted.
There is a lot of parameters to take into account.

Never the less, a good challenge is always nice :)

_________________
Blue Eye - Developer / Moderator
Code:
Gigus


Please read the rules about contribution points - click here

Do you know everything about BE, the forum, licenses and contribution points?
Please take a minute to read this introduction & guidelines.


Top
 Profile  
Reply with quote  
 Post subject: Re: Tetris Bot
Thanked: 0 time(s)  Unread post Posted: Fri Jul 02, 2010 4:50 pm 
Active User
Active User



Joined: Fri Jul 02, 2010 11:35 am
Posts: 36
Been thanked: 3 time(s)
Has thanked: 0 time(s)
Contribution Points: 37
Ok, I find Tetris on this page http://www.tetrisfriends.com/. Just click play.

I can make screenshots from Tetris in odlotek.pl page. Just tell me what pictures I must do.


Top
 Profile  
Reply with quote  
 Post subject: Re: Tetris Bot
Thanked: 0 time(s)  Unread post Posted: Fri Jul 02, 2010 5:41 pm 
Lifetime VIP Contributor
Lifetime VIP Contributor
User avatar



Joined: Sat Apr 24, 2010 12:51 pm
Posts: 355
Location: Tallinn
Been thanked: 18 time(s)
Has thanked: 1 time(s)
Contribution Points: 4647
1st you need to make pictures of each pice that comes next "since they are different colour"

and mark down the X Y and RGB values

ill do some in sec

sorry to say, but its not the same game :( since the RGB and the XY will be different form the game you like

or you want bot for this?

sad is that all games are different, and you cant make universal macro, since all the values in other games are different

_________________
Full time IT student/worker - BE showed me the way, so may the code be with you all!
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Tetris Bot
Thanked: 0 time(s)  Unread post Posted: Fri Jul 02, 2010 5:51 pm 
Active User
Active User



Joined: Fri Jul 02, 2010 11:35 am
Posts: 36
Been thanked: 3 time(s)
Has thanked: 0 time(s)
Contribution Points: 37
So you mean here is that I gave you the color of each block and its position right?

I make bot for this first game from odlotek.pl


Top
 Profile  
Reply with quote  
 Post subject: Re: Tetris Bot
Thanked: 0 time(s)  Unread post Posted: Fri Jul 02, 2010 6:12 pm 
Lifetime VIP Contributor
Lifetime VIP Contributor
User avatar



Joined: Sat Apr 24, 2010 12:51 pm
Posts: 355
Location: Tallinn
Been thanked: 18 time(s)
Has thanked: 1 time(s)
Contribution Points: 4647
Image

ok i explain,

1st you press on the image, where you want, "Eyedropper" is the same location zoomed in, where you can set by exact pixel where you want
2nd you look the RGB value
3rd the X and Y

so for this image:
Code:
  begin
     Color.Flush screen dump cache()
     If  Color.At coordinate is (RGB)("203", "47", "78", "776", "428")
          begin
               Color.Wait for color at coordinate not to be (RGB)("203", "47", "78", "776", "428")
               Macro.Pause("1000")
          end
     if  Color.At coordinate is (RGB)("203", "47", "78", "776", "428") <-- change the values for 2nd kind of color
          begin
               Color.Wait for color at coordinate not to be (RGB)("203", "47", "78", "776", "428")
               Macro.Pause("1000")
          end
 end
 
 


i hope this is the easiest way to start with it

so it would look like: it looks whats next, and now it waits until the color changes, then macro has values what to do with this kind of piece :P

but there must be some more code added in front that has values from the previous piece, to put the pice in right place before waiting for color to change

and after that code, that gives values to the next time

i think i did i right, but i might not :D

oh i might know how to show macro wheres free spots, just bunch 100+ color cordinate check :D

jeje im gettin stupid now, feelin my brain will explode when i try to think how to do this :o

_________________
Full time IT student/worker - BE showed me the way, so may the code be with you all!
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Tetris Bot
Thanked: 0 time(s)  Unread post Posted: Fri Jul 02, 2010 6:51 pm 
Active User
Active User



Joined: Fri Jul 02, 2010 11:35 am
Posts: 36
Been thanked: 3 time(s)
Has thanked: 0 time(s)
Contribution Points: 37
Image
R: 224
G: 2
B: 2
X: 745
Y: 254

<--------------------------------------------->
Image
R: 123
G: 50
B: 96
X: 757
Y: 279

<--------------------------------------------->
Image
R: 77
G: 155
B: 142
X: 758
Y: 274

<--------------------------------------------->
Image
R: 215
G: 157
B: 145
X: 758
Y: 278

<--------------------------------------------->
Image
R: 210
G: 93
B: 0
X: 758
Y: 260

<--------------------------------------------->
Image
R: 39
G: 177
B: 38
X: 757
Y: 278

<--------------------------------------------->
Image
R: 205
G: 184
B: 0
X: 734
Y: 280


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2, 3  Next

All times are UTC


You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group