TorcsCritic_ddpg.emadl 581 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
/* (c) https://github.com/MontiCore/monticore */
package torcs.agent.network;

component TorcsCritic {
    ports
        in Q^{29} state,
        in Q(-1:1)^{3} action,
        out Q(-oo:oo)^{1} qvalues;
    
    implementation CNN {
        (
            state ->
            FullyConnected(units=300) ->
            Relu() ->
            FullyConnected(units=600)
        |
            action -> 
            FullyConnected(units=600)
        )->
        Add() ->
        FullyConnected(units=600) ->
        Relu() ->
        FullyConnected(units=1) ->
        qvalues;
    }
}