BUG: correct averaging bug in compute_system_rewards
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 75/100
Direzione di ricerca
Inizia da Population.compute_system_rewards, dove l’issue mostra che le statistiche per agente vengono accumulate e che il ciclo per il calcolo della media è posizionato in modo errato. Assicurati che i valori restituiti siano medie calcolate sugli agenti anziché somme grezze, quindi verifica il risultato del metodo per più agenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Population.compute_system_rewards always returns the raw sum of per-agent stats instead of the average, inflating every value by a factor of N (number of agents).
Bug
The averaging loop has two problems — it modifies agent_reward (the local per-agent dict) instead of reward (the accumulated total), and it sits inside the for agent loop so the result is discarded on the next iteration anyway.
# buggy [header-1](#header-1)
for agent in self.agents:
agent_reward = agent.compute_morphology_statistics()
for k, v in agent_reward.items():
reward[k] += v
# average — wrong variable, wrong scope
for k in agent_reward.keys():
agent_reward[k] = agent_reward[k] / len(self.agents)
- Lingua principale
- Python
- Stelle
- 8
- Fork
- 3
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di SakanaAI/LanguageEvolution
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Tutte le issue di SakanaAI/LanguageEvolution
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100