How set actuator properties while the game is running?
The bpy module does not work in the game engine, use the bge functions instead.

For instance:

objectList = bge.logic.getCurrentScene().objects
bge.logic.getCurrentController().actuators['&lt;name&gt;'].target = objectList['XX']


More information can be found on the bge.logic and bge.types pages of the blender python api.