How to let an RL Agent move the mouse? Gday guys,

I'am building a game enviroment (picture) where an agent should position the mouse on the screen (cords upper right corner) and then click to shoot a canonball. If the goal (left) is hit. The agent gets a reward based on the elapsed time between this strike and the last one. If three shots missed. The game is done and the environment will reset.



The env is done so far. But now I wonder what the action space should look like. How can I make the agent choose some x and y coordinates? And how can I combine this whith a "shoot" action?

Thanks in advance for any help
You could make the actions


move up
move down
move left
move right
shoot


Then you can declare the speed of this movement. If you want to go more in depth you can do


Accelerate up
Accelerate down
Accelerate left
Accelerate right
Shoot


This will give control of the speed to the neural networkm but is harder to train, and you should give the speed of the mouse as an input.