Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More of a question... #18

Closed
mattlegro opened this issue Aug 12, 2021 · 7 comments
Closed

More of a question... #18

mattlegro opened this issue Aug 12, 2021 · 7 comments

Comments

@mattlegro
Copy link

Sorry, I know this isn't really an issue, but not sure where else I might ask such a question. I have a categorical action where a button hold modifies how a joystick input is interpreted, causing the x-axis of the joystick to affect roll instead of yaw. Is all that I need to add this button hold as a categorical action?

@mattlegro
Copy link
Author

Or maybe an if statement based on the button hold? Is that doable within Actions()

@mattlegro
Copy link
Author

Relatedly, a button press can toggle the camera setting from always directed toward an in-world object and to face the players positive +z direction in a left handed axes. Is using kControlFramePlayer going to interpret joystick values in both cases properly?

@hmoraldo
Copy link
Collaborator

In a case like that there are a few different solutions; you could use multiple actions for each kind of joystick, for example, but at the cost of increasing the amount of actions which can impact learning a lot.

What I would suggest instead is that you add a bit of code in the game to map the physical presses of joystick buttons to actions that more directly express intent, like: go in this direction (regardless of the current value of toggles).

@mattlegro
Copy link
Author

I haven't explored feelers much so sorry if this is a silly question, but the point of changing the camera setting for a human player to be oriented into the player's facing direction frame would be to look for entities that would be behind the camera while it is oriented toward the in-world object. Such as, you're locked onto a target and traveling away from it, but want to quickly look in the travel direction to make sure you're not running into anything or to purposely move over something. Do you have any insight on the impact on learner behavior if I don't add in the camera frame toggle and a human player uses it to change their FOV briefly? Using feelers (if I even understand what they do) could it still detect the entity outside of the camera FOV and avoid / move towards it if that is what is observed in the human players actions?

@hmoraldo
Copy link
Collaborator

The camera components of the observations and the joystick controls in the actions are related to each other (they are processed together), but the feelers aren't, in the sense that you can use arbitrary transforms for the feelers.

I would keep camera and controls as simple as possible, and try to keep feelers consistent. If you want your feelers to look at different directions, maybe make 2 sets of feelers, or make them go 360 degrees around your player.

Also, depending on the case you may want to restrict feelers to static world, and use entity observations to see enemies for example. Worth trying different things to see what works best in your case.

In any case, I recommend starting from a very very simple task, like just walking towards an object, and make sure your agent can accomplish that before moving on to a more difficult task. Starting from a task that is more complex, combines camera, joystick, feelers, toggles, etc. will make things very difficult to debug.

@mattlegro
Copy link
Author

Sounds good! Yeah I am just thinking into the future, but working on something as you suggest now, just moving towards a target. Thank you for your responses.

@hmoraldo
Copy link
Collaborator

No problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants