Background: Understanding the basis of 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 typically exhibit impaired fear extinction, pervasive avoidance, and overgeneralization of fear. While most research has examined deviations in these fear learning characteristics in isolation, their potential interactions remain understudied. Here, we introduce a modification of the platform-mediated avoidance task and use it to chart avoidance, generalization, and extinction using a single procedure in male and female rats. Results: In the first experiment, we demonstrated that male rats readily acquire avoidance, show a gradient of generalization in a two-day generalization test, and gradually reduce avoidance and fear responding under extinction. In the second experiment, female rats likewise exhibited successful avoidance learning, showed gradual generalization and extinction of defensive behaviors. Across both experiments, interesting sex differences emerged. The third experiment aimed at corroborating these sex differences but showed that they were subtler than expected from the prior separate experiments. Finally, we present an open-source automated system to facilitate the processing of DeepLabCut and SimBA output and obtain reliable results for scoring avoidance and freezing behavior. Conclusions: The modified platform-mediated avoidance task can effectively probe avoidance, generalization, and extinction of fear in male and female rats in a single procedure. Our automated behavioral scoring approach offers researchers an efficient and reproducible method to quantify the defensive behaviors of avoidance, freezing and darting in rats.