Any thoughts on Fortnite On-policy learning? (Minimize the reward loss)
import torch import torch.nn as nn import torch.optim as optim import numpy as np import matplotlib.pyplot as plt # ========================================== # 1. DEEP MODEL ARCHITECTURE (With Hidden Layers) # ========================================== class FortnitePolicyNet(nn.Module): def __init__(self): super(FortnitePolicyNet, self).__init__() # Added a hidden layer with 64 neurons to allow non-linear strategy mapping self.network = nn.Sequential( nn.Linear(10, 24), nn.ReLU(), nn.Linear(24, 12) ) # Safe initialization to prevent probability collapse for layer in self.network: if isinstance(layer, nn.Linear): torch.nn.init.xavier_uniform_(layer.weight) torch.nn.init.zeros_(layer.bias) def forward(self, s): logits […]