Skip to content

Latest commit

 

History

History
237 lines (177 loc) · 10.1 KB

LEARNING_RESOURCES.md

File metadata and controls

237 lines (177 loc) · 10.1 KB

Learning Resources for Achilles Codebase

This document contains Wikipedia links and tutorials for all technologies and concepts used in the Achilles evolutionary simulation.

Core Programming Language

C++


Graphics & Rendering

OpenGL

GLU (OpenGL Utility Library)

GLUT (OpenGL Utility Toolkit)

SDL (Simple DirectMedia Layer)

SDL2 vs SDL1

  • SDL2 Migration Guide: SDL2 Migration Guide
  • Key Differences:
    • SDL2 uses scancodes for keyboard state (not keycodes)
    • Window creation API changed (SDL_CreateWindow vs SDL_SetVideoMode)
    • Event handling improvements
    • Better multi-monitor support
  • SDL2 API Reference: SDL2 API Documentation

Build System

GNU Autotools (Autoconf, Automake)

pkg-config

  • Wikipedia: pkg-config
  • Official Documentation: pkg-config Manual
  • Why it's used: Automatically detects library installation paths, compiler flags, and linker flags
  • Common usage: pkg-config --cflags --libs sdl2 to get SDL2 compilation flags
  • Tutorial: Understanding pkg-config

Shell Scripting

Build System Architecture (Achilles-specific)

The Achilles build system uses:

  • configure.in: Autoconf script that detects system libraries (SDL2, OpenGL, GLU) using pkg-config
  • Makefile.am: Automake template that defines build rules
  • Makefile.in: Generated template with @VARIABLE@ substitutions
  • Makefile: Final generated file with actual paths and flags

Build Process:

  1. autoconf generates configure from configure.in
  2. automake generates Makefile.in from Makefile.am
  3. ./configure detects libraries and generates Makefile
  4. make compiles using the generated Makefile

Neural Networks & Machine Learning

Neural Networks (General)

Hebbian Learning


Evolutionary Algorithms

Genetic Algorithms

Evolutionary Algorithms (General)

Natural Selection & Evolution


Algorithms & Data Structures

Quicksort

Vector (Data Structure)

Stack (Data Structure)


3D Mathematics

Vector Mathematics

3D Rotation & Angles

3D Computer Graphics


Game Development Concepts

Game Loop

Collision Detection

Spatial Data Structures


Recommended Learning Order

  1. C++ Basics - Classes, pointers, STL containers
  2. 3D Mathematics - Vectors, angles, transformations
  3. OpenGL Basics - Rendering, transformations
  4. SDL - Window management, input handling
  5. Neural Networks - Feedforward networks, backpropagation
  6. Hebbian Learning - Specific learning algorithm used
  7. Genetic Algorithms - Crossover, mutation, selection
  8. Game Loop - Simulation concepts
  9. Autotools - Build system (if modifying build)
  10. pkg-config - Library detection and flag management
  11. SDL2 Migration - Understanding differences from SDL1 (if working with input handling)

Additional Resources

Build System Resources


Quick Reference

Essential Concepts for Understanding Achilles:

  • Object-Oriented Programming in C++
  • 3D Vector Mathematics (position, direction, distance)
  • Neural Network Architecture (layers, neurons, weights)
  • Hebbian Learning Rule (weight updates based on correlation)
  • Genetic Algorithm Operations (crossover, mutation, selection)
  • OpenGL Rendering Pipeline (vertices, transformations, drawing)
  • SDL2 Event Handling (keyboard input using scancodes, window management)
  • Game Loop Pattern (update, render, repeat)
  • pkg-config (automatic library detection for build system)

Build System Concepts:

  • Autoconf: Generates configure script that detects system capabilities
  • Automake: Generates Makefile.in from Makefile.am templates
  • pkg-config: Provides compiler and linker flags for installed libraries
  • Variable Substitution: @VARIABLE@ in templates gets replaced by configure

Recent Build System Updates

The Achilles build system has been updated to:

  • Automatically detect SDL2, OpenGL, and GLU using pkg-config
  • Support both SDL1 and SDL2 with automatic fallback
  • Generate correct Makefiles without manual path editing
  • Work across different Linux distributions and installation methods (system packages, homebrew, etc.)

Key Files:

  • configure.in: Contains library detection logic using pkg-config
  • Makefile.in: Template with variable substitutions (@SDL2_CFLAGS@, etc.)
  • Makefile.am: Automake source file defining build rules

To rebuild after changes:

autoconf          # Regenerate configure script
./configure       # Detect libraries and generate Makefile
make             # Compile

This document was generated to help understand the Achilles evolutionary simulation codebase.