Giter VIP home page Giter VIP logo

Comments (13)

beduffy avatar beduffy commented on June 5, 2024

Awesome question, in fact we were planning to make this task very soon. Feel free to check the PR and branch A3C_LSTM_GA_barebones for more task examples in tasks.py to see how we are doing similar. We might in fact make this soon.

However, if you want to create it yourself, it's probably best to contain all the logic within a single task. You'll have to store the target receptacle and target object and make sure that the agent is picking up the correct object and placing the object into the correct receptacle and then set done=True and reward=10 in transition_reward(). Thanks for your interest in our repo and feel free to add more questions here if this wasn't clear enough

from cups-rl.

Zzmonica avatar Zzmonica commented on June 5, 2024

Thanks for your reply, here I have another question about the training process, I have trained the experiment for a while, by training the main.py file, but it seems that it never gonna stop, so I'd like to consult when is the state of the experiment complete train? and how can I test the trained model? Hope your reply,Thanks~

from cups-rl.

beduffy avatar beduffy commented on June 5, 2024

Yeah, currently there is no stopping condition, it's an infinite loop. Changing this to break out of the loop after an arbitrary 1 or 10 million steps would be quite simple if that's what you want. But to actually answer your question:

You should calculate and keep note of some metrics like avg_episode_return, episode_lengths and episode_total_rewards. It'll be clear after 100,000-1million steps whether the agent is learning anything by looking at these metrics.

Examples of these can be found in the train.py file of the upcoming A3C_LSTM_GA pull request and using TensorboardX to visualise them as well as checkpointing and saving models:
https://github.com/TheMTank/ai2thor-experiments/blob/1a1548a7c43a7cd1105582f159e1946233bfbf7f/algorithms/a3c/train.py

Alternatively, there is a test.py and test() function in the multi-process version that runs continuously and periodically and sleeps for args.test_sleep_time seconds after each run. This will output the reward after an episode of the agent without training and can be easily modified to output any metric you want.

from cups-rl.

Zzmonica avatar Zzmonica commented on June 5, 2024

Hello, sorry to tell you that maybe you forget to upload build files.
Unity build file at: /ai2thor-experiments/gym_ai2thor/build_files/build_bowls_vs_cups_fp1_v_0.1.x86_64 does not exist
looking forward to your reply!

from cups-rl.

beduffy avatar beduffy commented on June 5, 2024

This is why the PR hasn't been merged yet, it's unfinished, but thanks for letting me know. But I'll be able to push the build file soon to a Google Drive (not worth putting on github) :).

For now, you can just change config_file you are using by AI2ThorEnv(config_file='default_config.json')
or much better: by inputting --config-file-name 'default_config.json'

Here is the reference argparam. The config file itself specifies or doesn't specify the build file (read the config files to see what I mean i.e. the default_config.json doesn't specify a build file so you don't need it)
parser.add_argument('--config-file-name', default='NL_lookat_bowls_vs_cups_fp1_config.json',
help='File must be in gym_ai2thor/config_files')

from cups-rl.

Zzmonica avatar Zzmonica commented on June 5, 2024

Hi, It seems that it can't create server correctly ,for that when I running env.close() it comes out self.server is a NoneType, do you know what reason? Thanks~
The error says that:
Traceback (most recent call last): File "algorithms/a3c/main.py", line 206, in <module> env.close() # above env initialisation was only to find certain params needed File "/home/zjw/Downloads/ai2thor-experiments-update/gym_ai2thor/envs/ai2thor_env.py", line 302, in close self.controller.stop() File "/home/zjw/.local/lib/python3.6/site-packages/ai2thor/controller.py", line 784, in stop self.server.wsgi_server.shutdown() AttributeError: 'NoneType' object has no attribute 'wsgi_server'

from cups-rl.

Zzmonica avatar Zzmonica commented on June 5, 2024

I know that, we can't close the env if it never been started,you need to put the self.controller.start() out of the if self.config.get('build_file_name'): , for that temporarily here we don't have build file,but it must be start anyway~
And now it works!

from cups-rl.

beduffy avatar beduffy commented on June 5, 2024

Thanks a lot for finding that bug, I'll commit the fix! I wasn't noticing it due to running everything from a build file. I'll push some build files soon as well for you!

from cups-rl.

Zzmonica avatar Zzmonica commented on June 5, 2024

OK, looking forward to your build file ! Tell you that you really did an awesome job ~ And I have a question that you also do research in language grounding?

from cups-rl.

beduffy avatar beduffy commented on June 5, 2024

Interesting question. spoiler alert as you saw in that branch we are working on the idea of language grounding within ai2thor and plan to fix and merge the PR soon. We are also going to start a blog series soon to explain our vision, plans and results related to what we do within this project and other 3D environments as we go along.
But to get an idea of what we are doing before the blogs, keep looking at our branches, we will keep our project open-source to be helpful for anyone in the field!

If you are doing some work related to or by using our wrapper, we will be happy to link it so people can see what awesome things can be done with it 👍

from cups-rl.

Zzmonica avatar Zzmonica commented on June 5, 2024

Very interesting job! I actually interested in this field like language grounding and task planning, wish we can talk about it frequently, and one more question, what is PR ?

from cups-rl.

beduffy avatar beduffy commented on June 5, 2024

Glad to hear you are interested in this field, it's very exciting.
PR = Pull Request.

from cups-rl.

beduffy avatar beduffy commented on June 5, 2024

We added a sample Unity build file and you can find the link to this on the README.

Also in the latest PR #10 we added the 5 extra pieces of information to the event.metadata regarding last objects and receptacles/objects interacted with. Two of these are 'lastObjectPut' and 'lastObjectPutReceptacle' and these can be used to create a task like PlaceCupInMicrowave. In a future PR we might create this ourself but the information should be within the metadata to do this now.

from cups-rl.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.