{"id":34970544,"url":"https://github.com/howerj/gladiators","last_synced_at":"2026-05-23T10:32:08.124Z","repository":{"id":147265655,"uuid":"267934407","full_name":"howerj/gladiators","owner":"howerj","description":"Evolve tiny agents that attack each other and find food","archived":false,"fork":false,"pushed_at":"2024-08-13T18:22:09.000Z","size":5381,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-13T21:41:19.715Z","etag":null,"topics":["c","genetic-algorithm","neural-network","neural-networks"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/howerj.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-29T19:04:15.000Z","updated_at":"2024-08-13T18:22:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"85782e01-12ec-4f83-8d8a-0318efb944b2","html_url":"https://github.com/howerj/gladiators","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/howerj/gladiators","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howerj%2Fgladiators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howerj%2Fgladiators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howerj%2Fgladiators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howerj%2Fgladiators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/howerj","download_url":"https://codeload.github.com/howerj/gladiators/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howerj%2Fgladiators/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33391885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","genetic-algorithm","neural-network","neural-networks"],"created_at":"2025-12-26T23:44:31.880Z","updated_at":"2026-05-23T10:32:08.116Z","avatar_url":"https://github.com/howerj.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"% arena(1) | Evolve Neural Net Controlled Gladiator\n\n# NAME\n\nARENA - A program for experimenting and evolving neural net controlled gladiators\n\n# SYNOPSES\n\narena [-] [-h] [-v] [-s] [-p] [-H]\n\n# DESCRIPTION\n\n\tAuthor:     Richard James Howe\n\tLicense:    MIT\n\tRepository: \u003chttps://github.com/howerj/gladiators\u003e\n\tEmail:      howe.r.j.89@gmail.com\n\tCopyright:  2016-2020 Richard James Howe\n\n**The serialization code is currently broken, if you have a file\ncalled \"gladiator.lsp\" delete it and re-run again**.\n\nThis is a simple toy program designed to display a series of 'gladiators'\nthat can fire at and evade each other. The gladiators are controlled by a\nneural network, which gets mutated and bred every generation of gladiators.\nWhich gladiators make it into the next round depends on their fitness level\ndetermined at the end of the current round.\n\nThere is a default configuration file called \"gladiators.conf\", which can be\nregenerated if it is missing. This file will be loaded, if present, after any\ncommand line arguments have been processed.\n\nThis program is intended to be a simple simulator for a battle arena where\n'gladiators' (simple [neural network][] controlled game artificial intelligences) \ncompete, this arena is combined with genetic algorithms to improve the AI. This\nis a toy project.\n\nThe idea is to get the program to a stage where it can evolve a gladiator that\ncan move around, hunt for food, kill enemy gladiators and doge projectiles.\n\nMany of the parameter are configurable, so the food game mechanic can be\ndisabled for example, this changes the direction in which the gladiators can\nevolve. A few interesting gladiators have been produced by this tool, some \nwhich can dodge slightly, and seek out other gladiators, with the right \nconfiguration.\n\nThis program was inspired by watching [A video][] of a program which does\nroughly the same as this one, with an explanation (in French, at \n[doublezoom.free.fr][]) on how the program shown in the video works. Whilst \nmost of the general details are explained there does not seem to be any \nsource code for this application, which is a shame, the video shows the\ngladiators learning how to move, how to fire, and eventually how to dodge enemy\nprojectiles.\n\nHere are some videos of the evolved gladiators running:\n\n![After many generations](gladiators-1.gif)\n\nAnd:\n\n![Afer more](gladiators-2.gif)\n\nThere is still a lot to improve, but the system works.\n\n# LICENSE\n\nThis is released under the MIT License.\n\n# OPTIONS\n\nSeveral options may be given to the program before it becomes a Windowed\napplication.\n\n- '-' \n\nStop processing any command line options\n\n- '-h' \n\nPrint out a help message and exit with an error.\n\n- '-v;\n\nIncrease the verbosity or log level of the program.\n\n- '-s'\n\nAttempt to save a default \"gladiators.conf\" configuration file to disk, and\nexit.\n\n- '-p'\n\nPrint the default configuration to stdout(3) and exit.\n\n- '-H'\n\nRun in 'headerless' mode, or without a GUI.\n\n# EXAMPLES\n\n\t./arena\n\nRun the arena, loading the default configuration file if present from the disk.\n\n\n# EXIT STATUS\n\nThis command returns zero on success and non zero on failure.\n\n# BUGS\nThis program is a work in progress, the gladiators do not do anything useful at\nthe moment.\n\n\n## BUILDING\n\nTo build [gcc][] (or a suitable C compiler), [make][] (GNU Make was used), \nand [OpenGl][]/[glut][] (pre-compiled binaries are available for most Linux\ndistributions as well as Windows) are needed. Type 'make' to build and 'make\nrun' to run the default configuration, this should take a while to run and then\npop up a window with some 'evolved' gladiators.\n\n## Architecture and Theory\n\nAs this project was meant to be an introduction for the author into both\n[OpenGl][] and [neural networks][] the theory will be brief and light. For a\ngood introduction to [neural networks][] see the [Usenet FAQ][].\n\n## Configurable Items\n\nThere are many configurable items within the program that affect the outcomes\nand strategies that the gladiators must adopt to succeed.\n\nThe default values for these items will not be covered here, but can be viewed\nin header file [vars.h][] along with a boolean indicating whether the value is\nallowed to be zero.\n\n## References\n\nThis project is based on this one:\n\n* \u003chttps://www.youtube.com/watch?v=u2t77mQmJiY\u003e\n* \u003chttp://doublezoom.free.fr/programmation/AG_Exemple_Fighting.php\u003e\n\nFor collision detection:\n\n* \u003chttp://elancev.name/oliver/2D%20polygon.htm\u003e\n\nFor neural networks:\n\n* \u003cftp://ftp.sas.com/pub/neural/FAQ.html\u003e\n* \u003chttps://en.wikipedia.org/wiki/Activation_function\u003e\n\n# Future direction\n\nIt would be good to see if it would be possible to evolve gladiators that could\ncooperate together in teams against other teams. \n\nAnother possible avenue for development would be to make this more into a game\nwhere a player could compete against the results of the contest to see which\none can last the longest.\n\n# To Do\n\n* A demonstration video should be made and linked to, perhaps uploaded to\n  YouTube.\n* The physics engine is a big dodgy and could use work\n* Work on adding a player: They should only be able to see what a gladiator\ncan, which is quite limiting, adding to the challenge.\n* The selection mechanism needs to be improved, each generation should have a\nmuch higher population count, and the selection mechanisms needs to be\nchanged. A population of about 50 gladiators would fight in a tournament, with\ngreater probability of reproduction going to the winners.\n* Completely separate out GUI so, so a headless, non-gui executable can be\nproduced. Perhaps a better looking SDL version could be produced as well.\n* Performance improvements so evolution can take place quicker\n* Different types of AI brains could be loaded, for example the best evolved\nneural network AI could go up against a manually programmed one, using\n[GPGOAL][] as the engine. (Also see\n\u003chttp://alumni.media.mit.edu/~jorkin/goap.html\u003e)\n* A version in which the gladiators would have to learn to pick up food and\ndrop it off at a place could be made as well. This would probably require two\nmore inputs; food carried and drop off point in vision.\n* Generate the manual page from this file\n* Make the program into a library with a CLI and GUI front end\n* Add obstacles that can be viewed by the gladiators, so they can\nnavigate around them, this might encourage more movement and fewer snipers.\n\n[GPGOAP]: https://github.com/stolk/GPGOAP\n[A video]: https://www.youtube.com/watch?v=u2t77mQmJiY\n[doublezoom.free.fr]: http://doublezoom.free.fr/programmation/AG_Exemple_Fighting.php\n[OpenGL]: https://www.opengl.org/\n[neural network]: https://en.wikipedia.org/wiki/Artificial_neural_network\n[neural networks]: https://en.wikipedia.org/wiki/Artificial_neural_network\n[activation function]: https://en.wikipedia.org/wiki/Activation_function\n[random variable]: http://www.stat.yale.edu/Courses/1997-98/101/ranvar.htm\n[Circular Sector]: https://en.wikipedia.org/wiki/Circular_sector\n[genetic algorithms]: https://en.wikipedia.org/wiki/Genetic_algorithm\n[Usenet FAQ]: ftp://ftp.sas.com/pub/neural/FAQ.html\n[smooth]: https://en.wikipedia.org/wiki/Smoothness\n[gcc]: https://gcc.gnu.org/\n[make]: https://www.gnu.org/software/make/\n[glut]: http://freeglut.sourceforge.net/\n\n\u003cstyle type=\"text/css\"\u003ebody{margin:40px auto;max-width:850px;line-height:1.6;font-size:16px;color:#444;padding:0 10px}h1,h2,h3{line-height:1.2}\u003c/style\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhowerj%2Fgladiators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhowerj%2Fgladiators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhowerj%2Fgladiators/lists"}