Understanding anxiety-related disorders can be advanced by studying the fear learning mechanisms implicated in the transition from adaptive to maladaptive fear. Individuals with anxiety disorders often show impaired fear extinction, pervasive avoidance, and overgeneralization of fear. While these characteristics are usually studied in isolation, their interactions are less understood. We modified the platform-mediated avoidance task to chart avoidance, generalization, and extinction in male and female rats. Male rats acquired avoidance, showed a gradient of generalization, and reduced avoidance and fear under extinction. Female rats also learned avoidance, showed gradual generalization, and extinction of defensive behaviors. Sex differences emerged in extinction learning but were subtler than expected. We present an open-source automated system for processing DeepLabCut and SimBA output to score avoidance and freezing behavior. This task effectively probes avoidance, generalization, and extinction of fear in rats, and our automated scoring approach offers a effective method to quantify defensive behaviors.