This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "render_options": {"depth": true}, | |
| "open_close_interaction": true, | |
| "pickup_put_interaction": true, | |
| "pickup_objects": [ | |
| "Apple" | |
| ], | |
| "acceptable_receptacles": [ | |
| "CounterTop", | |
| "TableTop", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PickUpTask(BaseTask): | |
| """ | |
| This task consists of picking up a target object. Rewards are only collected if the right | |
| object was added to the inventory with the action PickUp (See gym_ai2thor.envs.ai2thor_env for | |
| details). Because the agent can only carry 1 object at a time in its inventory, to receive | |
| a lot of reward one must learn to put objects down. Optimal behaviour will lead to the agent | |
| spamming PickupObject and PutObject near a receptacle | |
| """ | |
| def __init__(self, **kwargs): | |
| super().__init__(kwargs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from gym_ai2thor.envs.ai2thor_env import AI2ThorEnv | |
| config_dict = {'open_close_interaction': False, # disable opening/closing objects | |
| 'task': { | |
| 'task_name': 'PickUpTask', | |
| 'target_objects': {'Mug': 1} # 1 reward for picking up cup | |
| } | |
| } | |
| env = AI2ThorEnv(config_dict=config_dict) | |
| for episode in range(20): | |
| state = env.reset() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print("Hello, world!") | |
| # Python comments begin with # | |
| booleanVariable = True | |
| characterVariable = 'a' | |
| stringVariable = 'abc' | |
| integerVariable = 5 | |
| floatVariable = 5.0 | |
| if integerVariable > 4: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| console.log("Hello, world!"); | |
| booleanVariable = true; | |
| characterVariable = 'a'; | |
| integerVariable a = 5; | |
| floatVariable = 5.0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| class Program | |
| { | |
| public static void Main(string[] args) | |
| { | |
| Console.WriteLine("Hello, world!"); | |
| boolean = true; | |
| char = 'a'; | |
| int a = 5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package helloworldapp; | |
| public class HelloWorldApp { | |
| public static void main(String[] args) { | |
| System.out.println("Hello World!"); | |
| boolean = true; | |
| char = 'a'; | |
| int a = 5; | |
| float = 5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include | |
| int main() | |
| { | |
| std::cout << "Hello, world!"; | |
| bool = true; | |
| char = 'a'; | |
| int a = 5; | |
| float = 5; |