Reinforcement Learning (Plugins)

Discuss Scirra's 2D Asset Store

Post » Wed Mar 23, 2016 12:01 am

Perfect


I test this and make a feedback rapidly

this
http://cs.stanford.edu/people/karpathy/convnetjs/demo/rldemo.html
will be very helpful i think
B
14
S
3
G
3
Posts: 30
Reputation: 3,435

Post » Tue May 17, 2016 8:25 pm

egos wrote:Perfect


I test this and make a feedback rapidly

this
http://cs.stanford.edu/people/karpathy/convnetjs/demo/rldemo.html
will be very helpful i think


It will be possible to share your file CAPX?
I want to learn, please. :roll:
Image
B
50
S
20
G
9
Posts: 29
Reputation: 8,639

Post » Fri Jul 29, 2016 10:32 pm

I can't get this to work. Have tried the simplest training I could imagine: One input (random either "a" or "b") and two outputs (either "a" or "b"). Match between input and output is rewarded with 10, mismatch is punished with -10. After 20 minutes of "training" the output is still completely random.. Am I doing it wrong? @fundation2000
Image
Last edited by jan2000 on Sat Mar 18, 2017 6:03 pm, edited 1 time in total.
B
13
S
2
Posts: 43
Reputation: 745

Post » Sat Jul 30, 2016 9:21 am

jan2000 wrote:After 20 minutes of "training" the output is still completely random.. Am I doing it wrong?


Hi Jan. At first glance what you're doing looks correct to me. In my experience, it usually takes around 200.000 ticks (e.g. 3 hours) for the agent to begin behaving intelligently, e.g. to see it converge. This is a downside of Construct 2 - it only allows actions each tick, so you can't accelerate training beyond that.

Also, try setting Action:Learning to turn off the learning process after the training period - this way the agent won't undertake any more random actions and you get a clearer picture of the outputs which are correlated to your inputs.
B
9
S
2
Posts: 32
Reputation: 637

Post » Sun Jul 31, 2016 5:52 pm

You are right! After a long time it gets a lot better. Thank you!
Have you tried it on images?
B
13
S
2
Posts: 43
Reputation: 745

Post » Sun Jul 31, 2016 6:28 pm

I haven't, but I think it's not outside the realm of the possible.

However, if you want to look into this beyond game-AI-behaviour, I'd recommend you switch to either the JS version (or another version) of Deep-Q-Learning (here) which you can have running at thousands of ticks per second (instead of 60fps) or focus on some machine learning library, for example by using Tensor Flow.
B
9
S
2
Posts: 32
Reputation: 637

Post » Mon Jan 09, 2017 4:09 am

Who has a simple example please share! :cry:
B
11
S
1
Posts: 3
Reputation: 516

Post » Wed Jan 25, 2017 3:24 pm

Code: Select all
 instanceProto.saveToJSON = function ()
    {
        // return a Javascript object containing information about your object's state
        // note you MUST use double-quote syntax (e.g. "property": value) to prevent
        // Closure Compiler renaming and breaking the save format
        return { "brain_valuenet": this.brain.value_net,
            ................................................................

                //"layer_defs": this.layer_defs,
                "network_size": this.network_size >>>,<<<
        };
    };


The extra comma. Incorrect json and does not work LoadJSON
B
18
S
2
Posts: 24
Reputation: 888

Post » Thu Jan 26, 2017 3:16 pm

Thank you for pointing this out DeXVinogradov, I will fix it in the coming days.
B
9
S
2
Posts: 32
Reputation: 637

Post » Sat Apr 08, 2017 9:18 am

C2 SAVE/LOAD not supported.
No respons on support request :cry:
-1
Play free C2 games: http://www.gameus.de
B
32
S
18
G
13
Posts: 321
Reputation: 10,457

PreviousNext

Return to Scirra Store

Who is online

Users browsing this forum: No registered users and 0 guests