Page 1 of 1

Zooming

PostPosted: Sun Dec 04, 2016 4:05 am
by Peter
Hello,

how is it determined if the zoom goes to the left or to the right side?
The command is just "faking" the mouse wheel as far as I can see, without any additional parameters.
But it's still used to count the number of birds/find out which bird is on the sling. Which can only work if it's zooming into the left side of the image.
Is there a way to prevent zooming to the right side? It was working correctly so far, but now it seems to "randomly" zoom to the left or the right.

thanks

Peter

Re: Zooming

PostPosted: Mon Dec 05, 2016 10:18 am
by Gary
Hi Peter

The behaviour of the zoom in command depends on where the camera of the game is. You can select which side (left or right) to zoom into using the provided ClickInCentre command that either sets the camera to the left side or the right side.

Every time a level is loaded, the camera is set to the left side by the default. Therefore the zoom in command will always zoom into the left side of the game.

You can zoom into the right side by issuing "ClickInCenter" command and then the zoom in command. If you want to zoom into the left side again, you need to issue "ClickInCenter" again.

Smile,
Gary

Re: Zooming

PostPosted: Mon Dec 05, 2016 10:13 pm
by Peter
thanks for the reply.
I was aware of the ClickInCenter command but it's good to know that left side is default.

However, it's weird because I am not issuing any ClickInCenter-Commands (and I always send ZoomOut just before a shot)

Re: Zooming

PostPosted: Tue Dec 06, 2016 11:37 am
by Gary
Hi Peter

Can you please provide more information such as
In which level you encountered the problem?
What was the running agent?

Re: Zooming

PostPosted: Wed Dec 07, 2016 10:02 pm
by Peter
Hi Gary,

my own agent I'm trying to develop.
I use reinforcement learning and it seems to be independent of the level.
However, it mostly happens the next time it zooms in after an exploration action. (I wanted to write only but it just happend after an exploitation action)
There are random exploration actions and calculated exploitation actions, neither does interact with the server.
The agent zooms in, takes a screenshot, calculates the remaining number of birds, zooms out, chooses an action, execute that actions (and repeat)
And the server output is identical for both.

Server output for one shot:
Client 421337 Message: doScreenShot
Client 421337 Message: doScreenShot
Client 421337 Message: getState
Client 421337 Message: doScreenShot
Client 421337 Message: fullyZoomIn
Client 421337 Message: doScreenShot
Client 421337 Message: fullyZoomOut
Client 421337 Message: doScreenShot
Client 421337 Message: doScreenShot
Client 421337 Message: pFastshoot
Shoot from: (156 323 ), offset/polar: (-4 48) at time 0
Shooting Completed

Re: Zooming

PostPosted: Thu Dec 08, 2016 5:46 pm
by Gary
Hi Peter

Can you please try with "pshoot" or "cshoot" instead of the 'fast' options. The problem might be caused by that your agent did not wait for enough time before executing the next shot.
If this does not solve the problem, can you please try to run any published agent (e.g. the naive) to see whether they have the same problem.

Please let me know if it works. Thanks.