Skip to content

NFSP solving problem Q-Loss #319

@emanueleiacca

Description

@emanueleiacca

Hi, i'm sorry I don't know how to make a pull request, i am a noob in git :(
It has been 3 months since I'm working on RLCard for my bachelor degree thesis, rn I'm working on NFSP algorithm. I use Tensorboard to plot results and I was having problem to plot the loss, in the nfsp_agent.py code:
def feed(self, ts):
''' Feed data to inner RL agent

    Args:
        ts (list): A list of 5 elements that represent the transition.
    '''
    self._rl_agent.feed(ts)
    self.total_t += 1
    if self.total_t>0 and len(self._reservoir_buffer) >= self._min_buffer_size_to_learn and self.total_t%self._train_every == 0:
        sl_loss  = self.train_sl()
        print('\rINFO - Step {}, sl-loss: {}'.format(self.total_t, sl_loss), end='')

the function doesn't return the sl_loss, so this part should be added
return sl_loss
return None
Thank u very much for this wonderful project, I hope to help
Emanuele

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions