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

Multiple layers of neurons? #31

Open
NullVoxPopuli opened this issue Jul 8, 2020 · 2 comments
Open

Multiple layers of neurons? #31

NullVoxPopuli opened this issue Jul 8, 2020 · 2 comments

Comments

@NullVoxPopuli
Copy link

How hard would it be to implement this?

I'm trying ReinforceJS the 2048 game here: https://github.com/NullVoxPopuli/doctor-who-thirteen-game-ai/blob/master/worker.js#L105

and I've noticed a couple things:

  • the ai gets to it's best score (of not very high) pretty quickly
  • it seems to have trouble beating its best score
  • achieving the best score is likely a fluke of the random nature of tile spawns

Additionally,

  • I'm not sure how long I should expect training to take
  • is a day too long?

idk :D

@lin826
Copy link

lin826 commented Oct 27, 2020

Hi there,

Tracing the implementation, I guess the current version already supports the idea of "multiple layers"~

What you need is to modify these two lines with an array of layers as you like :)

this.actorLSTM = R.initLSTM(this.ns, [this.nh], this.na);

this.baselineLSTM = R.initLSTM(this.ns, [this.nhb], 1);

For example, neurons with two same-size layers:

    // Same-size hidden layers
    this.actorLSTM = R.initLSTM(this.ns, [this.nh, this.nh], this.na);
    ...
    // Same-size hidden layers
    this.baselineLSTM = R.initLSTM(this.ns, [this.nhb, this.nhb], 1);

btw, your link is in a private repo (others cannot access it 😢 )

@bilasyurii
Copy link

Hi! I wonder if there's a way to change network size for DQNAgent... 😄

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

3 participants