amazing-python-scripts

repository·main·Indexed 25 days ago

https://github.com/avinashkranjan/amazing-python-scripts

A curated collection of Python scripts for automation and utilities. The repository includes a variety of projects such as a 2048 game implementation, a Tkinter and SQLite Address-Book, an AI-based Music Composer using magenta, an Agriculture Optimization ML Model using KMeans and Logistic Regression, an AI Calculator with chatterbot, an AI Code Reviewer using pycodestyle, and an AI Driven Storytelling Game.

Tokens
164.2K
Snippets
659
Records
1.7K
Agent score
87%

What's inside amazing-python-scripts

  1. Overview of the Q-Learning implementation logic

    main

    The q_learning_taxi.py script implements the Q-Learning algorithm for the OpenAI Gym Taxi-v3 environment using these core steps:

    1. Environment Initialization: Initializes the Taxi-v3 environment.
    2. Training Loop: Runs a specified number of episodes.
    3. Action Selection: Uses an epsilon-greedy strategy, selecting actions randomly for exploration or based on learned Q-values for exploitation.
    4. Q-Table Updates: Updates the Q-table using the Q-Learning algorithm and adjusts the exploration rate over time.
    5. Performance Tracking: Stores rewards per episode and calculates the average reward per thousand episodes.
    6. Visualization: Renders the environment during play and visualizes performance in test episodes.
    7. Output: Prints the final Q-table and performance metrics after training.
  2. Overview of Living Cost EDA project

    main

    The Living Cost EDA (Exploratory Data Analysis) project is designed to analyze and visualize the relationships and distributions of various expense parameters. It focuses on exploring data related to:

    • Country
    • Food
    • Travel
    • Living
    • Lifestyle
    • Education
    • Income

    The project uses data visualizations to uncover how these different factors impact overall expenses and distributions across different regions.

  3. Overview of Gunship13k Gameplay

    main

    Gunship13k is a scoring-based shooter where players shoot enemies to accumulate points.

    Key Mechanics:

    • Multipliers: Chain kills to increase your multiplier and power up your cannon.
    • Risk/Reward: If an enemy passes you, your score multiplier resets.
    • Collision: Hitting an enemy with your ship triggers an explosion that kills everything.
    • Health: You have three lives; getting hit three times results in a 'Game Over'.