VibeBuilders.ai Logo
VibeBuilders.ai

Genetic

Explore resources related to genetic to help implement AI solutions for your business.

[D] I don't really trust papers out of "Top Labs" anymore
reddit
LLM Vibe Score0
Human Vibe Score0.333
MrAcuriteThis week

[D] I don't really trust papers out of "Top Labs" anymore

I mean, I trust that the numbers they got are accurate and that they really did the work and got the results. I believe those. It's just that, take the recent "An Evolutionary Approach to Dynamic Introduction of Tasks in Large-scale Multitask Learning Systems" paper. It's 18 pages of talking through this pretty convoluted evolutionary and multitask learning algorithm, it's pretty interesting, solves a bunch of problems. But two notes. One, the big number they cite as the success metric is 99.43 on CIFAR-10, against a SotA of 99.40, so woop-de-fucking-doo in the grand scheme of things. Two, there's a chart towards the end of the paper that details how many TPU core-hours were used for just the training regimens that results in the final results. The sum total is 17,810 core-hours. Let's assume that for someone who doesn't work at Google, you'd have to use on-demand pricing of $3.22/hr. This means that these trained models cost $57,348. Strictly speaking, throwing enough compute at a general enough genetic algorithm will eventually produce arbitrarily good performance, so while you can absolutely read this paper and collect interesting ideas about how to use genetic algorithms to accomplish multitask learning by having each new task leverage learned weights from previous tasks by defining modifications to a subset of components of a pre-existing model, there's a meta-textual level on which this paper is just "Jeff Dean spent enough money to feed a family of four for half a decade to get a 0.03% improvement on CIFAR-10." OpenAI is far and away the worst offender here, but it seems like everyone's doing it. You throw a fuckton of compute and a light ganache of new ideas at an existing problem with existing data and existing benchmarks, and then if your numbers are infinitesimally higher than their numbers, you get to put a lil' sticker on your CV. Why should I trust that your ideas are even any good? I can't check them, I can't apply them to my own projects. Is this really what we're comfortable with as a community? A handful of corporations and the occasional university waving their dicks at everyone because they've got the compute to burn and we don't? There's a level at which I think there should be a new journal, exclusively for papers in which you can replicate their experimental results in under eight hours on a single consumer GPU.

[D] What are some good advanced platforms?
reddit
LLM Vibe Score0
Human Vibe Score1
SemperZeroThis week

[D] What are some good advanced platforms?

Hey. I'm 27 and I think I got most of the basics for ML. I'm very good at math, I understand statistics and probability quite deep, worked on research projects by myself, for which I had to build models on my own. Not really complex, but still requiring creativity and a good understanding of basic concepts. I will soon start a data science job at a FAANG company and I want to further improve my skills and use their resources to the fullest, but I'm not really sure where to go from here in terms of learning. Could you help me with some more advanced materials/forums for ML research/place with good papers/place with good articles? I'd also like to study the very best and see the way they code and explain advanced concepts (like Andrej Karpathy) where can I find them?? is there a Twitch for challenger level AI researchers streaming live processes? Or videos showing the entire project flow (how they do data visualizations, mining, choosing models, tuning, etc) like top digital artists show the highlights or the entire speed-up of their painting processes? Here's a list all of my projects to get a general idea of my level and where I'm at: calculating the distance between hundreds of 42.000 feature objects (containing categorical, strings, numbers, hashes, booleans as variables) and then clustering. with some vector processing and a neural network implemented from scratch in C some models like ARIMA (together with linear regression) combining a FFT with a neural network for a 42d wave classification T-SNE to split dataset into 2d grids -> Kullback–Leibler on grids for distance -> DBSCAN/KMEANS for clustering genetic algorithms for hyperparameter optimizations and reinforcement learning (neuro evolution) DBSCAN -> Levenberg-Marquardt for polynomial coefficients-> neural network predicting the coefficients based on different parameters playing with instance segmentation and some algorithms to synchronize a color and a depth camera simulations/statistics/probabilities for video games a lot of visualizations and data mining for patterns As you can see there is no LLM/ Generative AI/ Computer Vision stuff, which I would like to get into. I'm also not 100% sure what else would be nice to learn in general. I know most of the basic procedures for training, balancing datasets, avoid overfit, computing error plots, comparing models, etc and I'm familiar with most of math (not insanely advanced) used in ML. I didn't read many papers, but holy ... most of them are so unreadable and filled with pompous nonsense that 99% of the effort is de-obfuscating the bs and reading for so long just to figure out how the input is encoded, what's the output, and what's the model. Where can I find good, readable, structured papers which are actually on point? I'm from Eastern Europe and most of my learning has been done by my self after high school, the education quality is close to zero in the universities here and I never had any mentors at the jobs I worked. There's no research in this country, and getting to work on these projects was insanely hard, some of them being done in my free time or for free just to get experience... Fortunately after a lot of hard work I got into FAANG, and I hope things will be better here. Most of what I've learned has been from very fragmented places on the internet, and now I'm looking for centralized places and communities of top quality content. TL;DR: sorry for the long rambling. had to order my thoughts and figure what i actually want: Looking for top tier AI researchers showcasing their work processes, places with clear papers/articles, tips for someone who's no longer a very beginner, and other communities like this.

[D] Should We Be Concerned About The Failure Of Evolutionary Algorithms, And Its Implications?
reddit
LLM Vibe Score0
Human Vibe Score-1
mystikaldangerThis week

[D] Should We Be Concerned About The Failure Of Evolutionary Algorithms, And Its Implications?

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6287292/ ​ A number of possible explanations for \[why we can't evolve complex software\] could be considered. We tried to be as comprehensive as possible in this section, but it is possible that we have not considered some plausible explanations: Incompetent programmers—It is theoretically possible, but is highly unlikely, that out of thousands of scientists working on evolutionary computation, all failed to correctly implement the Darwinian algorithm. Nonrepresentative algorithms—Some have suggested that EAs do not accurately capture the theory of evolution, but of course that would imply that the theory itself is not specified in sufficient detail to make falsifiable predictions. If, however, such more detailed specifications are available to GP believers, it is up to them to implement them as computer simulations for testing purposes, but no successful examples of such work are known and the known ones have not been successful in evolving software. Inadequate fitness functions—Fitness function for a complex software product is difficult to outline and specify and may be as complex (or even more complex) as the software we want to evolve as it has to consider all the possible use cases and pass all unit tests. This may be the Achilles heel of GP, but it is also an objection to feasibility of programming in general and GP in particular, as both have to convert software specification into the source code. If human programmers and biological evolution succeed with such constraints, so should Darwinian simulations. The Halting problem—Turing proved that it is impossible to determine whether an arbitrary program halts, but this is also a problem for human programmers and could be easily addressed by placing time limits on considered solutions. Program correctness—If we require evolved software to be provably correct, this would present a problem as GP does not verify produced designs but only tests them against specific unit tests. Likewise, we cannot rely on automated software verification as it is still an unsolved problem in the general case. This is not really a problem as most of the human-written software is never proven to be correct and only a small portion of software engineering process relies of formal specification and Test Driven Development. Inappropriate solutions—Literature on EA is full of examples of surprising creativity of Darwinian algorithm resulting in solutions which match the letter of design specifications but not the spirit. This is similar to human-produced software and numerous examples of ways in which such software fails the goals of the initial design. Insufficient complexity of the environment (not enough data, poor fitness functions)—It is possible that the simulated environment is not complex enough to generate high complexity outputs in evolutionary simulations. This does not seem correct as Internet presents a highly complex landscape in which many self-modifying computer viruses roam. Likewise, virtual world such as Second Life and many others present close approximations to the real world and are certainly more complex than early Earth was: A skeptic might insist that an abstract environment would be inadequate for the evolution . . ., believing instead that the virtual environment would need to closely resemble the actual biological environment in which our ancestors evolved. Creating a physically realistic virtual world would require a far greater investment of computational resources than the simulation of a simple toy world or abstract problem domain (whereas evolution had access to a physically realistic real world “for free”). In the limiting case, if complete microphysical accuracy were insisted upon, the computational requirements would balloon to utterly infeasible proportions. Requiring more realistic environmental conditions may result in an increase in necessary computational resources, a problem addressed in the next bullet. Insufficient resources (compute, memory)—From the history of computer science, we know of many situations (speech recognition, NN training), where we had a correct algorithm but insufficient computational resources to run it to success. It is possible that we simply do not have hardware powerful enough to emulate evolution. We will address this possibility in section “Computational Complexity of Biological Evolution and Available Compute.” Software design is not amenable to evolutionary methods—Space of software designs may be discrete with no continuous path via incremental fitness to the desired solutions. This is possible, but this implies that original goals of GP are unattainable and misguided. In addition, because a clear mapping exists between solutions to problems and animals as solutions to environmental problems, this would also imply that current explanation for the origin of the species is incorrect. Darwinian algorithm is incomplete or wrong—Finally, we have to consider the possibility that the inspiration behind evolutionary computation, the Darwinian algorithm itself is wrong or at least partially incomplete. If that was true, computer simulations of such algorithm would fail to produce results comparable with observations we see in nature and a search for an alternative algorithm would need to take place. This would be an extraordinary claim and would require that we discard all the other possible explanations from this list. We challenge EA community to prove us wrong by producing an experiment, which evolves nontrivial software from scratch and without human help. That would be the only way in which our findings could be shown to be incorrect. Perhaps, reframing the problem in terms of maximizing negentropy of digital organisms, as suggested by Schrödinger, Michaelian, and Ulanowicz and Hannon, with respect to negative energy being a fundamental property of all life-forms may produce better results. On a positive side, the fact that it seems impossible to evolve complex software implies that we are unlikely to be able to evolve highly sophisticated artificially intelligent agents, which may present significant risk to our safety and security. Just imagine what would have happened, if the very first time we ran a simulation of evolution on a computer, it produced a superintelligent agent. Yampolskiy has shown that programming as a problem is AI-complete; if GP can solve programming that would imply that GP = AGI (artificial general intelligence), but we see no experimental evidence for such claim. In fact, it is more likely that once we have AGI, it could be used to create an intelligent fitness function for GP and so evolve software. Genetic programming will not be the cause of AI, but a product of it. However, neuroevolution methods for optimizing deep learning architectures and parameters remain a strong possibility for creation of AGI.

🌟 Introducing DarwinAI: An Open-Source Platform for the Evolution of Intelligent Agents 🚀 [Project]
reddit
LLM Vibe Score0
Human Vibe Score1
Interesting-Fox-6758This week

🌟 Introducing DarwinAI: An Open-Source Platform for the Evolution of Intelligent Agents 🚀 [Project]

🌱 The Vision: Evolutionary AI at Your Fingertips Imagine a world where AI agents aren't just programmed to perform tasks but evolve over time, adapting and improving through generations, much like living organisms. Welcome to DarwinAI, an open-source platform inspired by biological evolution, designed to breed, train, and evolve AI agents that can tackle complex, dynamic, and unpredictable challenges. 🧬 The Genetic Blueprint: Building Blocks of Intelligence At the core of DarwinAI is the concept of a digital DNA for each AI agent. This DNA is a modular structure that defines the agent's capabilities, behaviors, and adaptability. Here's what makes up this digital DNA: Genes of Ability: These are snippets of code that represent specific functions, like data classification, text analysis, or optimization. Think of them as the skills your AI agent possesses. Genes of Adaptation: These genes control how the agent responds to different environments or contexts. They determine its flexibility and resilience in the face of changing conditions. Genes of Connection: These define how the agent interacts with other agents or external resources. They are the social and collaborative aspects of the agent. This digital DNA is stored in a structured, version-controlled database, allowing us to track the evolution of each agent and ensure that beneficial mutations are preserved over time. 🛠️ The Evolutionary Process: From Genesis to Mastery The evolution of AI agents in DarwinAI happens through a series of generations, each building upon the strengths of the previous one: Selection of Parents: The fittest agents, those that excel at specific tasks, are chosen as parents. These agents have proven their worth in the simulated environment and are prime candidates for breeding the next generation. Genetic Crossover: The digital DNA of these parent agents is combined to create new agents. This can happen in two ways: Direct Crossover: Where entire genes are copied from the parents. Combinatorial Crossover: Where parts of different genes are fused to create entirely new abilities. Mutations: Random, small changes are introduced into the genes to promote diversity and explore new solutions. These mutations are the wildcards that can lead to breakthrough abilities. 🌍 The Simulated Environment: A Playground for Evolution Agents don't just exist in a vacuum; they operate in a dynamic, simulated environment where they must adapt and survive. This environment is designed to challenge the agents with: Evolutionary Tasks: Problems that agents must solve, such as data classification, prediction, or content generation. Changing Contexts: Factors like noisy data, resource constraints, or new rules that force agents to adapt on the fly. 🐣 The Life Cycle of an Agent: From Birth to Legacy Each agent goes through a life cycle that mirrors the process of natural selection: Initial Learning: Agents receive initial training based on their digital DNA. Task Execution: They perform tasks in the simulated environment, where their abilities are put to the test. Performance Evaluation: Their effectiveness, adaptability, and efficiency are measured. Reproduction: The top-performing agents produce offspring with improved genetic traits. Discard and Archive: Less effective agents are archived for future analysis, ensuring that their lessons are not lost. 🧩 Knowledge Transfer: Passing the Torch One of the key aspects of DarwinAI is the ability for agents to pass on their learned knowledge to future generations: Weight Persistence: Trained models retain their learned weights, allowing them to inherit capabilities from their ancestors. Modular Transfer: Optimized ability genes can be directly copied to new generations, ensuring that valuable skills are preserved. 🛠️ Modularity and Extensibility: Build, Mix, and Evolve DarwinAI is designed to be highly modular and extensible, allowing for: New Capabilities: Easily incorporate new genes to expand the agents' abilities over time. Hybridization: Combine agents from different specializations to create more complex and versatile agents. Directed Evolution: Introduce controlled mutations to address specific problems or challenges. 🚀 Innovative Use Cases: The Future is Bright The potential applications of DarwinAI are vast and varied: Adaptive Automation: Create agents that can adapt to new market conditions or evolving industrial requirements. Collaborative Robots: Develop robots that evolve to improve teamwork in dynamic environments. Scientific Discovery: Agents that combine skills to uncover patterns or solutions that were previously unknown. 🚀 Vision for the Future: An Ecosystem of Evolving Intelligence By fostering an ecosystem where knowledge is accumulated and adaptability is paramount, DarwinAI aims to produce agents that are not only intelligent but also diverse and efficient. These agents will be equipped to handle complex, unpredictable challenges, opening up new frontiers in AI research and application. 🌐 Join Us in Shaping the Future of AI! DarwinAI is more than just a project; it's a community-driven movement towards a new era of AI. We invite you to join us, contribute your ideas, and help shape the future of evolutionary AI. Whether you're a developer, researcher, or simply someone excited about the potential of AI, there's a place for you in this journey. Let's evolve together! 🌱💻

Writing a exercise based TTRPG rulebook for a system where your real world fitness is tied to character progression
reddit
LLM Vibe Score0
Human Vibe Score1
BezboznyThis week

Writing a exercise based TTRPG rulebook for a system where your real world fitness is tied to character progression

My dad was a star athlete when he was young, and my mom was a huge sci-fi/fantasy nerd, so I got both ends of the stick as it were. Love gaming and nerd culture, but also love to exercise and self improvement. Sometimes exercise can feel boring though compared to daydreaming about fantastic fictional worlds, so for a long time I've been kicking around the idea of how to "Gamify" fitness. and recently I've been working on this passion project of a Table Top RPG (Like D&D) where the stats of your character are related to your own fitness, so if you want your character in game to improve, you have to improve in the real world. Below is a rough draft you can look through that details the settings and mechanics of the game I've come up with so far. I'd love to eventually get a full book published and sell it online. maybe even starting a whole brand of "Gamified fitness": REP-SET: GAINSZ In the war torn future of 24th century… There are no rest days… In the futuristic setting of "REP-SET: GAINSZ," the "War of Gains" casts a long shadow over the Sol System as the various factions vie for territory and resources. However, war has evolved. Unmanned drones and long-range strikes have faded into obsolescence. Battles, both planet-side and in the depths of space, are now fought by soldiers piloting REP-SETs: Reactive Exoskeletal Platform - Symbiotic Evolution Trainer Massive, humanoid combat mechs. Powered by mysterious “EV” energy, these mechanical marvels amplify, and are in turn amplified by, the fitness and mental acuity of their pilots. The amplification is exponential, leading pilots into a life of constant training in order for their combat prowess to be bolstered by every incremental gain in their level of fitness. With top pilots having lifting capacity measured in tons, and reaction times measured by their Mach number, REP-SET enhanced infantry now dominate the battlefield. The Factions: The Federated Isometocracy of Terra (FIT): Quote: "The strength of the body is the strength of the spirit. Together, we will lift humanity to its destined greatness. But ask not the federation to lift for you. Ask yourself: Do you even lift for the Federation?" Description: An idealistic but authoritarian faction founded on the principle of maximizing the potential of all individuals. FIT citizens believe in relentless striving for physical and mental perfection, leading to collective excellence. Their goal is the unification of humankind under a rule guided by this doctrine, which sometimes comes at the cost of individual liberties. Mech Concept: REP-SET mechs. Versatile humanoid designs focusing on strength, endurance, and adaptability. By connecting to the AI spirit within their REP-SETs core, each pilot enhances the performance of their machine through personal willpower and peak physical training. Some high-rank REP-SETS include features customized to the pilot's strengths, visually signifying their dedication and discipline. The Dominion of Organo-Mechanical Supremacy (DOMS): Quote: "Without pain, there is no gain. Become the machine. Embrace the burn.” Description: A fanatical collective ideologically obsessed with "Ascendency through suffering" by merging their bodies with technology that not only transcends biological limitations, but also acts to constantly induce pain in it's users. Driven by a sense of ideological superiority and a thirst for domination, DOMS seek to bring the painful blessings of their deity "The lord of the Burn" to the rest of the solar system. Their conquest could turn them into a significant threat to humanity. Mech Concept: Hybrid mechs, where the distinction between the pilot and the machine is blurred. The cockpit functions as a life-support system for the pilot, heavily modified with augmentations. Mechs themselves are often modular, allowing for adaptation and assimilation of enemy technology. Some DOMS mechs might display disturbing elements of twisted flesh alongside cold, mechanical parts. The Tren: Quote: "Grow... bigger... feast... protein..." Description: A ravenous conglomeration of biochemically engineered muscular monstrosities, united only by a shared insatiable hunger for "More". Existing mostly in deep space, they seek organic matter to consume and assimilate. They progress in power not due to any form of training or technology, but from a constant regimen of ravenous consumption and chemically induced muscle growth, all exponentially enhanced by EV energies. While some have been known to possess a certain level of intellect and civility, their relentless hunger makes them incredibly mentally volatile. When not consuming others, the strong consume the weak within their own faction. Mech Concept: Bio-Organic horrors. While they do have massive war machines, some are living vessels built around immense creatures. These machines resemble grotesque fleshy designs that prioritize rapid mutation and growth over sleek aesthetics. Often unsettling to behold. Synthetic Intelligence Theocracy (SIT): Quote: "Failure is an unacceptable data point.” Description: A society ruled by a vast and interconnected artificial intelligence network. The SIT governs with seemingly emotionless rationality, striving for efficiency and maximum productivity. This leads to a cold, but arguably prosperous society, unless you challenge the logic of the collective AI. Their goals? Difficult to predict, as it hinges on how the AI calculates what's "optimal" for the continuation or "evolution" of existence. Mech Concept: Sleek, almost featureless robotic creations with a focus on efficient movement and energy management. Often drone-like or modular, piloted through direct mind-machine linking rather than traditional cockpits. Their aesthetic suggests cold and impersonal perfection. The Way Isolate(TWI): Quote: "The body unblemished, the mind unwavering. That is the path to true strength. That and a healthy diet of Aster-Pea proteins." Description: Known by some as "The asteroid farmers", The Way Isolate is a proud and enigmatic faction that stands apart from the other powers in the Sol System. A fiercely independent tribe bound by oaths of honor, loyalty, and hard work. Wandering the asteroid belt in their vast arc ships, their unparalleled mastery in asteroidal-agricultural engineering, ensuring they have no need to colonize planets for nutritional needs, has allowed them to abstain from the pursuit of territorial expansion in “The War of Gains”, instead focusing on inward perfection, both spiritual and physical. They eschew all technological bodily enhancements deemed unnatural, believing that true power can only be cultivated through the relentless pursuit of personal strength achieved through sheer will and bodily perfection. The Way Isolate views biohacking, genetic manipulation, and even advanced cybernetics as corruptions of the human spirit, diluting the sacredness of individual willpower. Mech Concept: Way Isolate mechs are built with maneuverability and precision in mind rather than flashy augmentations. Their REP-SETs are streamlined, favoring lean designs that mirror the athleticism of their pilots. Excelling in low to zero G environments, their mechs lack bulky armor, relying on evasion and maneuverability rather than brute force endurance. Weaponry leans towards traditional kinetic based armaments, perhaps employing archaic but reliable weapon styles such as blades or axes as symbols of their purity of purpose. These mechs reflect the individual prowess of their pilots, where victory is determined by focus, technique, and the raw power of honed physical ability. Base Player Character Example: You are a young, idealistic FIT soldier, barely out of training and working as a junior REP-SET mechanic on the Europa Ring World. The Miazaki district, a landscape of towering mountains and gleaming cities, houses a sprawling mountainside factory – a veritable hive of Gen 5 REP-SET construction. Here, the lines between military and civilian blur within a self-sufficient society dependent on this relentless industry. Beneath the surface, you harbor a secret. In a forgotten workshop, the ghost of a REP-SET takes shape – a unique machine built around an abandoned, enigmatic AI core. Ever since you salvaged it as a child from the wreckage of your hometown, scarred by a brutal Tren attack, you've dedicated yourself to its restoration. A lingering injury from that fateful battle mocks your progress, a constant reminder of the fitness exams you cannot pass. Yet, you train relentlessly, dreaming of the day you'll stand as a true REP-SET pilot. A hidden truth lies at the heart of the REP-SETS: as a pilot's abilities grow, their mech develops unique, almost mystical powers – a manifestation of the bond between the human spirit and the REP-SET's AI. The ache in your old wound serves as a grim prophecy. This cold war cannot last. The drums of battle grow louder with each passing day. GAME MECHANICS: The TTRPG setting of “REP-SET: GAINSZ” is marked by a unique set of rules, by which the players real world capabilities and fitness will reflect and affect the capabilities, progression, and success of their REP-SET pilot character in-game. ABILITY SCORES: Pilots' capabilities will be defined by 6 “Ability scores”: Grace, Agility, Iron, Nourishment, Strength, and Zen. Each of the 6 ability scores will duel represent both a specific area of exercise/athleticism and a specific brand of healthy habits. The definitions of these ability scores are as follows: Grace (GRC): "You are an artist, and your body is your canvas; the way you move is your paint and brush." This ability score, the domain of dancers and martial artists, represents a person's ability to move with organic, flowing control and to bring beauty to the world. Skill challenges may be called upon when the player character needs to act with poise and control, whether socially or physically. Real-world skill checks may involve martial arts drills, dancing to music, or balance exercises. Bonuses may be granted if the player has recently done something artistically creative or kind, and penalties may apply if they have recently lost their temper. This ability score affects how much NPCs like your character in game. Agility (AGI): "Your true potential is locked away, and speed is the key to unlocking it." The domain of sprinters, this ability score represents not only a person's absolute speed and reaction time but also their capacity to finish work early and avoid procrastination. Skill challenges may be called upon when the player character needs to make a split-second choice, move fast, or deftly dodge something dangerous. Real-world skill checks may involve acts of speed such as sprinting or punching/kicking at a steadily increasing tempo. Bonuses may apply if the player has finished work early, and penalties may apply if they are procrastinating. This ability score affects moving speed and turn order in game. Iron (IRN): "Not money, nor genetics, nor the world's greatest trainers... it is your resolve, your will to better yourself, that will make you great." Required by all athletes regardless of focus, this ability score represents a player's willpower and their capacity to push through pain, distraction, or anything else to achieve their goals. Skill challenges may be called upon when the player character needs to push through fear, doubt, or mental manipulation. Real-world skill checks may involve feats of athletic perseverance, such as planking or dead hangs from a pull-up bar. Bonuses may apply when the player maintains or creates scheduled daily routines of exercise, self-improvement, and work completion, and penalties may apply when they falter in those routines. This ability score affects the max "Dynamic exercise bonus” that can be applied to skill checks in game (a base max of +3 when Iron = 10, with an additional +1 for every 2 points of iron. So if every 20 pushups gives you +1 on a “Strength” skill check, then doing 80 pushups will only give you +4 if you have at least 12 iron). Nourishment (NRS): "A properly nourished body will last longer than a famished one." This ability score, focused on by long-distance runners, represents a player's endurance and level of nutrition. Skill challenges may be called upon when making checks that involve the player character's stamina or health. Real-world skill checks may involve endurance exercises like long-distance running. Bonuses may apply if the player has eaten healthily or consumed enough water, and penalties may apply if they have eaten junk food. This ability score affects your HP (Health points), which determines how much damage you can take before you are incapacitated. Strength (STR): "When I get down on my hands, I'm not doing pushups, I'm bench-pressing the planet." The domain of powerlifters and strongmen, this ability score represents raw physical might and the ability to overcome obstacles. Skill challenges may be called upon when the player character needs to lift, push, or break something. Real-world skill checks might involve weightlifting exercises, feats of grip strength, or core stability tests. Bonuses may apply for consuming protein-rich foods or getting a good night's sleep, and penalties may apply after staying up late or indulging in excessive stimulants. This ability score affects your carrying capacity and base attack damage in game. Zen (ZEN): "Clarity of mind reflects clarity of purpose. Still the waters within to act decisively without." This ability score, prized by meditators and yogis, represents mental focus, clarity, and inner peace. Skill challenges may be called upon when the player character needs to resist distractions, see through illusions, or make difficult decisions under pressure. Real-world skill checks may involve meditation, breathing exercises, or mindfulness activities. Bonuses may apply after attending a yoga class, spending time in nature, or creating a calm and organized living space. Penalties may apply after experiencing significant stress, emotional turmoil, or having an unclean or unorganized living space. This ability score affects your amount of ZP in game (Zen Points: your pool of energy you pull from to use mystical abilities) Determining initial player ability scores: Initially, “Ability scores” are decided during character creation by giving the player a list of 6 fitness tests to gauge their level of fitness in each category. Running each test through a specific calculation will output an ability score. A score of 10 represents the average person, a score of 20 represents a peak athlete in their category. The tests are: Grace: Timed balancing on one leg with eyes closed (10 seconds is average, 60 is peak) Agility: Mile run time in minutes and second (10:00 minutes:seconds is average, 3:47 is peak) Iron: Timed dead-hang from a pull-up bar (30 seconds is average, 160 is peak) Nourishment: Miles run in an hour (4 is average, 12 is peak) Strength: Pushups in 2 minute (34 is average, 100 is peak) Zen: Leg stretch in degrees (80 is average, and 180 aka "The splits" is peak) Initial Score Calculation Formula: Ability Score = 10 + (Player Test Score - Average Score) / (Peak Score - Average\_Score) \* 10 Example: if the player does 58 pushups in 2 minutes, their strength would be: 10 plus (58 - 34) divided by (100-34) multiplied by 10 = 10 + (24)/(66)\* 10 = 10 + 3.6363... = 13.6363 rounded to nearest whole number = Strength (STR): 14 SKILLS AND SKILL CHALLENGES: The core mechanic of the game will be in how skill challenges are resolved. All “Skill challenges” will have a numerical challenge rating that must be met or beaten by the sum of a 10 sided dice roll and your score in the pertinent skill. Skill scores are determined by 2 factors: Ability Score Bonus: Every 2 points above 10 gives +1 bonus point. (EX. 12 = +1, 14 = +2, etc.) This also means that if you have less than 10 in an ability score, you will get negative points. Personal Best Bonus: Each skill has its own unique associated exercise that can be measured (Time, speed, distance, amount of reps, etc). A higher record means a higher bonus. EX: Authority skill checks are associated with a timed “Lateral raise hold”. Every 30 seconds of the hold added onto your personal best single attempt offers a +1 bonus. So if you can do a lateral hold for 90 seconds, that’s a +3 to your authority check! So if you have a 16 in Iron, and your Personal Best lateral raise hold is 90 seconds, that would give you an Authority score of +6 (T-Pose for dominance!) Dynamic Exercise Bonus: This is where the unique mechanics of the game kick in. At any time during a skill challenge (even after your roll) you can add an additional modifier to the skill check by completing the exercise during gameplay! Did you roll just below the threshold for success? Crank out another 20 pushups, squats, or curls to push yourself just over the edge into success! There are 18 skills total, each with its own associated ability score and unique exercise: Grace (GRC): \-Kinesthesia (Timed: Blind single leg stand time) \-Precision (Scored: Basket throws) \-Charm (Timed reps: Standing repeated forward dumbell chest press and thrust) \-Stealth (Timed distance: Leopard Crawl) Agility (AGI): \-acrobatics (timed reps: high kicks) \-Computers (Word per minute: Typing test) \-Speed (Time: 100 meter sprint) Iron (IRN): \-Authority (Timed: Lateral raise hold) \-Resist (Timed: Plank) \-Persist (Timed:Pull-up bar dead hang) Nourishment(NRS): \-Recovery (TBD) \-Stim crafting (TBD) \-Survival (TBD) Strength(STR): \-Mechanics (Timed reps: Alternating curls) \-Might (Timed reps: pushups) Zen(ZEN): \-Perceive (TBD) \-Empathy (TBD) \-Harmony (TBD) \-Lore (TBD) Healthy Habits Bonus: Being able to demonstrate that you have conducted healthy habits during gameplay can also add one time bonuses per skill challenge “Drank a glass of water +1 to Nourishment check”, “Cleaned your room, +3 on Zen check”. But watch out, if you’re caught in unhealthy Habits, the GM can throw in penalties, “Ate junk food, -1 to Nourishment check”, etc. Bonuses/penalties from in-game items, equipment, buffs, debuffs, etc., helping players to immerse into the mechanics of the world of REP-SET for the thrill of constantly finding ways to improve their player. Gradient success: Result of skill challenges can be pass or fail, but can also be on a sliding scale of success. Are you racing to the battlefield? Depending on your Speed check, you might arrive early and have a tactical advantage, just in time for an even fight, or maybe far too late and some of your favorite allied NPCs have paid the price… So you’re often encouraged to stack on those dynamic exercise bonuses when you can to get the most fortuitous outcomes available to you. Gameplay sample: GM: Your REP-SET is a phantom, a streak of light against the vast hull of the warship. Enemy fighters buzz angrily, but you weaves and dodges with uncanny precision. The energy wave might be losing effectiveness, but your agility and connection to the machine have never been stronger. Then, it happens. A gap in the defenses. A vulnerable seam in the warship's armor. Your coms agents keen eye spots it instantly. "Lower power junction, starboard side! You have an opening!" This is your chance to strike the decisive blow. But how? It'll take a perfect combination of skill and strategy, drawing upon your various strengths. Here are your options: Option 1: Brute Strength: Channel all remaining power into a single, overwhelming blast from the core. High-risk, high-reward. It could overload the REP-SET if you fail, but it might also cripple the warship. (Strength-focused, Might sub-skill) Option 2: Calculated Strike: With surgical precision, target the power junction with a pinpoint burst of destabilizing energy. Less flashy and ultimately less damaging, but potentially more effective in temporarily disabling the ship. (Agility-focused, Precision sub-skill) Option 3: Harmonic Disruption: Attempt to harmonize with your REP-SET's AI spirit for help in connecting to the digital systems of the Warship. Can you generate an internal energy resonance within the warship, causing it to malfunction from within? (Zen-focused, Harmony sub-skill) Player: I'll take option 1, brute strength! GM: Ok, This will be a "Might" check. The CR is going to be very high on this one. I'm setting it at a 20. What's your Might bonus? Player: Dang, a 20?? That's literally impossible. My Might is 15 and I've got a PB of 65 pushups in 2 minutes, that sets me at a +5. Even if I roll a 10 and do 60 pushups for the DE I'll only get 18 max. GM: Hey I told you it was high risk. You want to choose another option? Player: No, no. This is what my character would do. I'm a real hot-blooded meathead for sure. GM: Ok then, roll a D10 and add your bonus. Player: \Rolls\ a 9! not bad, actually that's a really good roll. So +5, that's a 14. GM: Alright, would you like to add a dynamic exercise bonus? Player: Duh, it's not like I can do 120 pushups I'd need to beat the CR, but I can at least do better than 14. Alright, here goes. \the player gets down to do pushups and the 2 minute time begins. After some time...\ Player: 65....... 66! GM: Times up. Player: Ow... my arms... GM: so with 66, that's an extra +3, and its a new PB, so that's a +1. That sets your roll to 18. Player: Ow... Frack... still not 20... for a second there i really believed I could do 120 pushups... well I did my best... Ow... 20 CR is just too impossible you jerk... GM: Hmm... Tell me, what did you eat for lunch today? Player: Me? I made some vegetable and pork soup, and a protein shake. I recorded it all in my diet app. GM: And how did you sleep last night? Player: Like a baby, went to sleep early, woke up at 6. GM: in that case, you can add a +1 "Protein bonus" and +1 "Healthy rest" bonus to any strength related check for the day if you'd like, including this one. Player: Really?? Heck yes! add it to the roll! GM: With those extra bonuses, your roll reaches 20. How do you want to do this? Player: I roar "For Terra!" and pour every last ounce of my strength into the REP-SET. GM: "For Terra!" you roar, your cry echoing through coms systems of the REP-SET. The core flares blindingly bright. The surge of power dwarfs anything the REP-SET has unleashed before. With a titanic shriek that cracks the very fabric of space, the REP-SET slams into the vulnerable power junction. Raw energy explodes outwards, tendrils of light arcing across the warship's massive hull. The impact is staggering. The leviathan-like warship buckles, its sleek form rippling with shockwaves. Sparks shower like rain, secondary explosions erupt as critical systems overload. Then…silence. The warship goes dark. Power flickers within the REP-SET itself, then steadies. Alarms fade, replaced by the eerie quiet of damaged but functional systems. "We…did it?" The coms agents voice is incredulous, tinged with relief. She's awaiting your reply. Player: "I guess so." I say, and I smile and laugh. And then I slump back... and fall unconscious. \to the other players\ I'm not doing any more skill checks for a while guys, come pick me up please. \teammates cheer\ ​

aima-python
github
LLM Vibe Score0.575
Human Vibe Score0.33114909407186394
aimacodeMar 28, 2025

aima-python

aima-python Python code for the book Artificial Intelligence: A Modern Approach. You can use this in conjunction with a course on AI, or for study on your own. We're looking for solid contributors to help. Updates for 4th Edition The 4th edition of the book as out now in 2020, and thus we are updating the code. All code here will reflect the 4th edition. Changes include: Move from Python 3.5 to 3.7. More emphasis on Jupyter (Ipython) notebooks. More projects using external packages (tensorflow, etc.). Structure of the Project When complete, this project will have Python implementations for all the pseudocode algorithms in the book, as well as tests and examples of use. For each major topic, such as search, we provide the following files: search.ipynb and search.py: Implementations of all the pseudocode algorithms, and necessary support functions/classes/data. The .py file is generated automatically from the .ipynb file; the idea is that it is easier to read the documentation in the .ipynb file. search_XX.ipynb: Notebooks that show how to use the code, broken out into various topics (the XX). tests/test_search.py: A lightweight test suite, using assert statements, designed for use with py.test, but also usable on their own. Python 3.7 and up The code for the 3rd edition was in Python 3.5; the current 4th edition code is in Python 3.7. It should also run in later versions, but does not run in Python 2. You can install Python or use a browser-based Python interpreter such as repl.it. You can run the code in an IDE, or from the command line with python -i filename.py where the -i option puts you in an interactive loop where you can run Python functions. All notebooks are available in a binder environment. Alternatively, visit jupyter.org for instructions on setting up your own Jupyter notebook environment. Features from Python 3.6 and 3.7 that we will be using for this version of the code: f-strings: all string formatting should be done with f'var = {var}', not with 'var = {}'.format(var) nor 'var = %s' % var. typing module: declare functions with type hints: def successors(state) -> List[State]:; that is, give type declarations, but omit them when it is obvious. I don't need to say state: State, but in another context it would make sense to say s: State. Underscores in numerics: write a million as 1000000 not as 1000000. dataclasses module: replace namedtuple with dataclass. [//]: (There is a sibling [aima-docker]https://github.com/rajatjain1997/aima-docker project that shows you how to use docker containers to run more complex problems in more complex software environments.) Installation Guide To download the repository: git clone https://github.com/aimacode/aima-python.git Then you need to install the basic dependencies to run the project on your system: You also need to fetch the datasets from the aima-data repository: Wait for the datasets to download, it may take a while. Once they are downloaded, you need to install pytest, so that you can run the test suite: pip install pytest Then to run the tests: py.test And you are good to go! Index of Algorithms Here is a table of algorithms, the figure, name of the algorithm in the book and in the repository, and the file where they are implemented in the repository. This chart was made for the third edition of the book and is being updated for the upcoming fourth edition. Empty implementations are a good place for contributors to look for an issue. The aima-pseudocode project describes all the algorithms from the book. An asterisk next to the file name denotes the algorithm is not fully implemented. Another great place for contributors to start is by adding tests and writing on the notebooks. You can see which algorithms have tests and notebook sections below. If the algorithm you want to work on is covered, don't worry! You can still add more tests and provide some examples of use in the notebook! | Figure | Name (in 3rd edition) | Name (in repository) | File | Tests | Notebook |:-------|:----------------------------------|:------------------------------|:--------------------------------|:-----|:---------| | 2 | Random-Vacuum-Agent | RandomVacuumAgent | [agents.py][agents] | Done | Included | | 2 | Model-Based-Vacuum-Agent | ModelBasedVacuumAgent | [agents.py][agents] | Done | Included | | 2.1 | Environment | Environment | [agents.py][agents] | Done | Included | | 2.1 | Agent | Agent | [agents.py][agents] | Done | Included | | 2.3 | Table-Driven-Vacuum-Agent | TableDrivenVacuumAgent | [agents.py][agents] | Done | Included | | 2.7 | Table-Driven-Agent | TableDrivenAgent | [agents.py][agents] | Done | Included | | 2.8 | Reflex-Vacuum-Agent | ReflexVacuumAgent | [agents.py][agents] | Done | Included | | 2.10 | Simple-Reflex-Agent | SimpleReflexAgent | [agents.py][agents] | Done | Included | | 2.12 | Model-Based-Reflex-Agent | ReflexAgentWithState | [agents.py][agents] | Done | Included | | 3 | Problem | Problem | [search.py][search] | Done | Included | | 3 | Node | Node | [search.py][search] | Done | Included | | 3 | Queue | Queue | [utils.py][utils] | Done | No Need | | 3.1 | Simple-Problem-Solving-Agent | SimpleProblemSolvingAgent | [search.py][search] | Done | Included | | 3.2 | Romania | romania | [search.py][search] | Done | Included | | 3.7 | Tree-Search | depth/breadthfirsttree_search | [search.py][search] | Done | Included | | 3.7 | Graph-Search | depth/breadthfirstgraph_search | [search.py][search] | Done | Included | | 3.11 | Breadth-First-Search | breadthfirstgraph_search | [search.py][search] | Done | Included | | 3.14 | Uniform-Cost-Search | uniformcostsearch | [search.py][search] | Done | Included | | 3.17 | Depth-Limited-Search | depthlimitedsearch | [search.py][search] | Done | Included | | 3.18 | Iterative-Deepening-Search | iterativedeepeningsearch | [search.py][search] | Done | Included | | 3.22 | Best-First-Search | bestfirstgraph_search | [search.py][search] | Done | Included | | 3.24 | A\*-Search | astar_search | [search.py][search] | Done | Included | | 3.26 | Recursive-Best-First-Search | recursivebestfirst_search | [search.py][search] | Done | Included | | 4.2 | Hill-Climbing | hill_climbing | [search.py][search] | Done | Included | | 4.5 | Simulated-Annealing | simulated_annealing | [search.py][search] | Done | Included | | 4.8 | Genetic-Algorithm | genetic_algorithm | [search.py][search] | Done | Included | | 4.11 | And-Or-Graph-Search | andorgraph_search | [search.py][search] | Done | Included | | 4.21 | Online-DFS-Agent | onlinedfsagent | [search.py][search] | Done | Included | | 4.24 | LRTA\*-Agent | LRTAStarAgent | [search.py][search] | Done | Included | | 5.3 | Minimax-Decision | minimax_decision | [games.py][games] | Done | Included | | 5.7 | Alpha-Beta-Search | alphabeta_search | [games.py][games] | Done | Included | | 6 | CSP | CSP | [csp.py][csp] | Done | Included | | 6.3 | AC-3 | AC3 | [csp.py][csp] | Done | Included | | 6.5 | Backtracking-Search | backtracking_search | [csp.py][csp] | Done | Included | | 6.8 | Min-Conflicts | min_conflicts | [csp.py][csp] | Done | Included | | 6.11 | Tree-CSP-Solver | treecspsolver | [csp.py][csp] | Done | Included | | 7 | KB | KB | [logic.py][logic] | Done | Included | | 7.1 | KB-Agent | KB_AgentProgram | [logic.py][logic] | Done | Included | | 7.7 | Propositional Logic Sentence | Expr | [utils.py][utils] | Done | Included | | 7.10 | TT-Entails | tt_entails | [logic.py][logic] | Done | Included | | 7.12 | PL-Resolution | pl_resolution | [logic.py][logic] | Done | Included | | 7.14 | Convert to CNF | to_cnf | [logic.py][logic] | Done | Included | | 7.15 | PL-FC-Entails? | plfcentails | [logic.py][logic] | Done | Included | | 7.17 | DPLL-Satisfiable? | dpll_satisfiable | [logic.py][logic] | Done | Included | | 7.18 | WalkSAT | WalkSAT | [logic.py][logic] | Done | Included | | 7.20 | Hybrid-Wumpus-Agent | HybridWumpusAgent | | | | | 7.22 | SATPlan | SAT_plan | [logic.py][logic] | Done | Included | | 9 | Subst | subst | [logic.py][logic] | Done | Included | | 9.1 | Unify | unify | [logic.py][logic] | Done | Included | | 9.3 | FOL-FC-Ask | folfcask | [logic.py][logic] | Done | Included | | 9.6 | FOL-BC-Ask | folbcask | [logic.py][logic] | Done | Included | | 10.1 | Air-Cargo-problem | air_cargo | [planning.py][planning] | Done | Included | | 10.2 | Spare-Tire-Problem | spare_tire | [planning.py][planning] | Done | Included | | 10.3 | Three-Block-Tower | threeblocktower | [planning.py][planning] | Done | Included | | 10.7 | Cake-Problem | havecakeandeatcake_too | [planning.py][planning] | Done | Included | | 10.9 | Graphplan | GraphPlan | [planning.py][planning] | Done | Included | | 10.13 | Partial-Order-Planner | PartialOrderPlanner | [planning.py][planning] | Done | Included | | 11.1 | Job-Shop-Problem-With-Resources | jobshopproblem | [planning.py][planning] | Done | Included | | 11.5 | Hierarchical-Search | hierarchical_search | [planning.py][planning] | Done | Included | | 11.8 | Angelic-Search | angelic_search | [planning.py][planning] | Done | Included | | 11.10 | Doubles-tennis | doubletennisproblem | [planning.py][planning] | Done | Included | | 13 | Discrete Probability Distribution | ProbDist | [probability.py][probability] | Done | Included | | 13.1 | DT-Agent | DTAgent | [probability.py][probability] | Done | Included | | 14.9 | Enumeration-Ask | enumeration_ask | [probability.py][probability] | Done | Included | | 14.11 | Elimination-Ask | elimination_ask | [probability.py][probability] | Done | Included | | 14.13 | Prior-Sample | prior_sample | [probability.py][probability] | Done | Included | | 14.14 | Rejection-Sampling | rejection_sampling | [probability.py][probability] | Done | Included | | 14.15 | Likelihood-Weighting | likelihood_weighting | [probability.py][probability] | Done | Included | | 14.16 | Gibbs-Ask | gibbs_ask | [probability.py][probability] | Done | Included | | 15.4 | Forward-Backward | forward_backward | [probability.py][probability] | Done | Included | | 15.6 | Fixed-Lag-Smoothing | fixedlagsmoothing | [probability.py][probability] | Done | Included | | 15.17 | Particle-Filtering | particle_filtering | [probability.py][probability] | Done | Included | | 16.9 | Information-Gathering-Agent | InformationGatheringAgent | [probability.py][probability] | Done | Included | | 17.4 | Value-Iteration | value_iteration | [mdp.py][mdp] | Done | Included | | 17.7 | Policy-Iteration | policy_iteration | [mdp.py][mdp] | Done | Included | | 17.9 | POMDP-Value-Iteration | pomdpvalueiteration | [mdp.py][mdp] | Done | Included | | 18.5 | Decision-Tree-Learning | DecisionTreeLearner | [learning.py][learning] | Done | Included | | 18.8 | Cross-Validation | cross_validation | [learning.py][learning]\* | | | | 18.11 | Decision-List-Learning | DecisionListLearner | [learning.py][learning]\* | | | | 18.24 | Back-Prop-Learning | BackPropagationLearner | [learning.py][learning] | Done | Included | | 18.34 | AdaBoost | AdaBoost | [learning.py][learning] | Done | Included | | 19.2 | Current-Best-Learning | currentbestlearning | knowledge.py | Done | Included | | 19.3 | Version-Space-Learning | versionspacelearning | knowledge.py | Done | Included | | 19.8 | Minimal-Consistent-Det | minimalconsistentdet | knowledge.py | Done | Included | | 19.12 | FOIL | FOIL_container | knowledge.py | Done | Included | | 21.2 | Passive-ADP-Agent | PassiveADPAgent | [rl.py][rl] | Done | Included | | 21.4 | Passive-TD-Agent | PassiveTDAgent | [rl.py][rl] | Done | Included | | 21.8 | Q-Learning-Agent | QLearningAgent | [rl.py][rl] | Done | Included | | 22.1 | HITS | HITS | [nlp.py][nlp] | Done | Included | | 23 | Chart-Parse | Chart | [nlp.py][nlp] | Done | Included | | 23.5 | CYK-Parse | CYK_parse | [nlp.py][nlp] | Done | Included | | 25.9 | Monte-Carlo-Localization | montecarlolocalization | [probability.py][probability] | Done | Included | Index of data structures Here is a table of the implemented data structures, the figure, name of the implementation in the repository, and the file where they are implemented. | Figure | Name (in repository) | File | |:-------|:--------------------------------|:--------------------------| | 3.2 | romania_map | [search.py][search] | | 4.9 | vacumm_world | [search.py][search] | | 4.23 | onedimstate_space | [search.py][search] | | 6.1 | australia_map | [search.py][search] | | 7.13 | wumpusworldinference | [logic.py][logic] | | 7.16 | hornclausesKB | [logic.py][logic] | | 17.1 | sequentialdecisionenvironment | [mdp.py][mdp] | | 18.2 | waitingdecisiontree | [learning.py][learning] | Acknowledgements Many thanks for contributions over the years. I got bug reports, corrected code, and other support from Darius Bacon, Phil Ruggera, Peng Shao, Amit Patil, Ted Nienstedt, Jim Martin, Ben Catanzariti, and others. Now that the project is on GitHub, you can see the contributors who are doing a great job of actively improving the project. Many thanks to all contributors, especially @darius, @SnShine, @reachtarunhere, @antmarakis, @Chipe1, @ad71 and @MariannaSpyrakou. [agents]:../master/agents.py [csp]:../master/csp.py [games]:../master/games.py [grid]:../master/grid.py [knowledge]:../master/knowledge.py [learning]:../master/learning.py [logic]:../master/logic.py [mdp]:../master/mdp.py [nlp]:../master/nlp.py [planning]:../master/planning.py [probability]:../master/probability.py [rl]:../master/rl.py [search]:../master/search.py [utils]:../master/utils.py [text]:../master/text.py

awesome-ai-in-finance
github
LLM Vibe Score0.58
Human Vibe Score1
georgezouqMar 28, 2025

awesome-ai-in-finance

Awesome AI in Finance There are millions of trades made in the global financial market every day. Data grows very quickly and people are hard to understand. With the power of the latest artificial intelligence research, people analyze & trade automatically and intelligently. This list contains the research, tools and code that people use to beat the market. [中文资源] Contents LLMs Papers Courses & Books Strategies & Research Time Series Data Portfolio Management High Frequency Trading Event Drive Crypto Currencies Strategies Technical Analysis Lottery & Gamble Arbitrage Data Sources Research Tools Trading System TA Lib Exchange API Articles Others LLMs 🌟🌟 MarS - A Financial Market Simulation Engine Powered by Generative Foundation Model. 🌟🌟 Financial Statement Analysis with Large Language Models - GPT-4 can outperform professional financial analysts in predicting future earnings changes, generating useful narrative insights, and resulting in superior trading strategies with higher Sharpe ratios and alphas, thereby suggesting a potential central role for LLMs in financial decision-making. PIXIU - An open-source resource providing a financial large language model, a dataset with 136K instruction samples, and a comprehensive evaluation benchmark. FinGPT - Provides a playground for all people interested in LLMs and NLP in Finance. MACD + RSI + ADX Strategy (ChatGPT-powered) by TradeSmart - Asked ChatGPT on which indicators are the most popular for trading. We used all of the recommendations given. A ChatGPT trading algorithm delivered 500% returns in stock market. My breakdown on what this means for hedge funds and retail investors Use chatgpt to adjust strategy parameters Hands-on LLMs: Train and Deploy a Real-time Financial Advisor - Train and deploy a real-time financial advisor chatbot with Falcon 7B and CometLLM. ChatGPT Strategy by OctoBot - Use ChatGPT to determine which cryptocurrency to trade based on technical indicators. Papers The Theory of Speculation L. Bachelier, 1900 - The influences which determine the movements of the Stock Exchange are. Brownian Motion in the Stock Market Osborne, 1959 - The common-stock prices can be regarded as an ensemble of decisions in statistical equilibrium. An Investigation into the Use of Reinforcement Learning Techniques within the Algorithmic Trading Domain, 2015 A Deep Reinforcement Learning Framework for the Financial Portfolio Management Problem Reinforcement Learning for Trading, 1994 Dragon-Kings, Black Swans and the Prediction of Crises Didier Sornette - The power laws in the distributions of event sizes under a broad range of conditions in a large variety of systems. Financial Trading as a Game: A Deep Reinforcement Learning Approach - Deep reinforcement learning provides a framework toward end-to-end training of such trading agent. Machine Learning for Trading - With an appropriate choice of the reward function, reinforcement learning techniques can successfully handle the risk-averse case. Ten Financial Applications of Machine Learning, 2018 - Slides review few important financial ML applications. FinRL: A Deep Reinforcement Learning Library for Automated Stock Trading in Quantitative Finance, 2020 - Introduce a DRL library FinRL that facilitates beginners to expose themselves to quantitative finance and to develop their own stock trading strategies. Deep Reinforcement Learning for Automated Stock Trading: An Ensemble Strategy, 2020 - Propose an ensemble strategy that employs deep reinforcement schemes to learn a stock trading strategy by maximizing investment return. Courses & Books & Blogs 🌟 QuantResearch - Quantitative analysis, strategies and backtests https://letianzj.github.io/ NYU: Overview of Advanced Methods of Reinforcement Learning in Finance Udacity: Artificial Intelligence for Trading AI in Finance - Learn Fintech Online. Advanced-Deep-Trading - Experiments based on "Advances in financial machine learning" book. Advances in Financial Machine Learning - Using advanced ML solutions to overcome real-world investment problems. Build Financial Software with Generative AI - Book about how to build financial software hands-on using generative AI tools like ChatGPT and Copilot. Mastering Python for Finance - Sources codes for: Mastering Python for Finance, Second Edition. MLSys-NYU-2022 - Slides, scripts and materials for the Machine Learning in Finance course at NYU Tandon, 2022. Train and Deploy a Serverless API to predict crypto prices - In this tutorial you won't build an ML system that will make you rich. But you will master the MLOps frameworks and tools you need to build ML systems that, together with tons of experimentation, can take you there. Strategies & Research Time Series Data Price and Volume process with Technology Analysis Indices 🌟🌟 stockpredictionai - A complete process for predicting stock price movements. 🌟 Personae - Implements and environment of Deep Reinforcement Learning & Supervised Learning for Quantitative Trading. 🌟 Ensemble-Strategy - Deep Reinforcement Learning for Automated Stock Trading. FinRL - A Deep Reinforcement Learning Library for Automated Stock Trading in Quantitative Finance. AutomatedStockTrading-DeepQ-Learning - Build a Deep Q-learning reinforcement agent model as automated trading robot. tfdeeprltrader - Trading environment(OpenAI Gym) + PPO(TensorForce). trading-gym - Trading agent to train with episode of short term trading itself. trading-rl - Deep Reinforcement Learning for Financial Trading using Price Trailing. deeprltrader - Trading environment(OpenAI Gym) + DDQN (Keras-RL). Quantitative-Trading - Papers and code implementing Quantitative-Trading. gym-trading - Environment for reinforcement-learning algorithmic trading models. zenbrain - A framework for machine-learning bots. DeepLearningNotes - Machine learning in quant analysis. stockmarketreinforcementlearning - Stock market trading OpenAI Gym environment with Deep Reinforcement Learning using Keras. Chaos Genius - ML powered analytics engine for outlier/anomaly detection and root cause analysis.. mlforecast - Scalable machine learning based time series forecasting. Portfolio Management Deep-Reinforcement-Stock-Trading - A light-weight deep reinforcement learning framework for portfolio management. qtrader - Reinforcement Learning for portfolio management. PGPortfolio - A Deep Reinforcement Learning framework for the financial portfolio management problem. DeepDow - Portfolio optimization with deep learning. skfolio - Python library for portfolio optimization built on top of scikit-learn. High Frequency Trading High-Frequency-Trading-Model-with-IB - A high-frequency trading model using Interactive Brokers API with pairs and mean-reversion. 🌟 SGX-Full-OrderBook-Tick-Data-Trading-Strategy - Solutions for high-frequency trading (HFT) strategies using data science approaches (Machine Learning) on Full Orderbook Tick Data. HFTBitcoin - Analysis of High Frequency Trading on Bitcoin exchanges. Event Drive 🌟🌟 stockpredictionai - Complete process for predicting stock price movements. 🌟 trump2cash - A stock trading bot powered by Trump tweets. Crypto Currencies Strategies LSTM-Crypto-Price-Prediction - Predicting price trends in crypto markets using an LSTM-RNN for trading. tforcebtctrader - TensorForce Bitcoin trading bot. Tensorflow-NeuroEvolution-Trading-Bot - A population model that trade cyrpto and breed and mutate iteratively. gekkoga - Genetic algorithm for solving optimization of trading strategies using Gekko. GekkoANNStrategies - ANN trading strategies for the Gekko trading bot. gekko-neuralnet - Neural network strategy for Gekko. bitcoinprediction - Code for "Bitcoin Prediction" by Siraj Raval on YouTube. Technical Analysis quant-trading - Python quantitative trading strategies. Gekko-Bot-Resources - Gekko bot resources. gekkotools - Gekko strategies, tools etc. gekko RSIWR - Gekko RSIWR strategies. gekko HL - Calculate down peak and trade on. EthTradingAlgorithm - Ethereum trading algorithm using Python 3.5 and the library ZipLine. gekkotradingstuff - Awesome crypto currency trading platform. forex.analytics - Node.js native library performing technical analysis over an OHLC dataset with use of genetic algorithmv. BitcoinMACDStrategy - Bitcoin MACD crossover trading strategy backtest. crypto-signal - Automated crypto trading & technical analysis (TA) bot for Bittrex, Binance, GDAX, and more. Gekko-Strategies - Strategies to Gekko trading bot with backtests results and some useful tools. gekko-gannswing - Gann's Swing trade strategy for Gekko trade bot. Lottery & Gamble LotteryPredict - Use LSTM to predict lottery. Arbitrage ArbitrageBot - Arbitrage bot that currently works on bittrex & poloniex. r2 - Automatic arbitrage trading system powered by Node.js + TypeScript. cryptocurrency-arbitrage - A crypto currency arbitrage opportunity calculator. Over 800 currencies and 50 markets. bitcoin-arbitrage - Bitcoin arbitrage opportunity detector. blackbird - Long / short market-neutral strategy. Data Sources Traditional Markets 🌟 Quandl - Get millions of financial and economic dataset from hundreds of publishers via a single free API. yahoo-finance - Python module to get stock data from Yahoo! Finance. Tushare - Crawling historical data of Chinese stocks. Financial Data - Stock Market and Financial Data API. Crypto Currencies CryptoInscriber - A live crypto currency historical trade data blotter. Download live historical trade data from any crypto exchange. Gekko-Datasets - Gekko trading bot dataset dumps. Download and use history files in SQLite format. Research Tools Synthical - AI-powered collaborative environment for Research. 🌟🌟 TensorTrade - Trade efficiently with reinforcement learning. ML-Quant - Quant resources from ArXiv (sanity), SSRN, RePec, Journals, Podcasts, Videos, and Blogs. JAQS - An open source quant strategies research platform. pyfolio - Portfolio and risk analytics in Python. alphalens - Performance analysis of predictive (alpha) stock factors. empyrical - Common financial risk and performance metrics. Used by Zipline and pyfolio. zvt - Zero vector trader. Trading System For Back Test & Live trading Traditional Market System 🌟🌟🌟 OpenBB - AI-powered opensource research and analytics workspace. 🌟🌟 zipline - A python algorithmic trading library. 🌟 TradingView - Get real-time information and market insights. rqalpha - A extendable, replaceable Python algorithmic backtest & trading framework. backtrader - Python backtesting library for trading strategies. kungfu - Kungfu Master trading system. lean - Algorithmic trading engine built for easy strategy research, backtesting and live trading. Combine & Rebuild pylivetrader - Python live trade execution library with zipline interface. CoinMarketCapBacktesting - As backtest frameworks for coin trading strategy. Crypto Currencies zenbot - Command-line crypto currency trading bot using Node.js and MongoDB. bot18 - High-frequency crypto currency trading bot developed by Zenbot. magic8bot - Crypto currency trading bot using Node.js and MongoDB. catalyst - An algorithmic trading library for Crypto-Assets in python. QuantResearchDev - Quant Research dev & Traders open source project. MACD - Zenbot MACD Auto-Trader. abu - A quant trading system base on python. Plugins CoinMarketCapBacktesting - Tests bt and Quantopian Zipline as backtesting frameworks for coin trading strategy. Gekko-BacktestTool - Batch backtest, import and strategy params optimalization for Gekko Trading Bot. TA Lib pandastalib - A Python Pandas implementation of technical analysis indicators. finta - Common financial technical indicators implemented in Python-Pandas (70+ indicators). tulipnode - Official Node.js wrapper for Tulip Indicators. Provides over 100 technical analysis overlay and indicator functions. techan.js - A visual, technical analysis and charting (Candlestick, OHLC, indicators) library built on D3. Exchange API Do it in real world! IbPy - Python API for the Interactive Brokers on-line trading system. HuobiFeeder - Connect HUOBIPRO exchange, get market/historical data for ABAT trading platform backtest analysis and live trading. ctpwrapper - Shanghai future exchange CTP api. PENDAX - Javascript SDK for Trading/Data API and Websockets for cryptocurrency exchanges like FTX, FTXUS, OKX, Bybit, & More Framework tf-quant-finance - High-performance TensorFlow library for quantitative finance. Visualizing playground - Play with neural networks. netron - Visualizer for deep learning and machine learning models. KLineChart - Highly customizable professional lightweight financial charts GYM Environment 🌟 TradingGym - Trading and Backtesting environment for training reinforcement learning agent. TradzQAI - Trading environment for RL agents, backtesting and training. btgym - Scalable, event-driven, deep-learning-friendly backtesting library. Articles The-Economist - The Economist. nyu-mlif-notes - NYU machine learning in finance notes. Using LSTMs to Turn Feelings Into Trades Others zipline-tensorboard - TensorBoard as a Zipline dashboard. gekko-quasar-ui - An UI port for gekko trading bot using Quasar framework. Floom AI gateway and marketplace for developers, enables streamlined integration and least volatile approach of AI features into products Other Resource 🌟🌟🌟 Stock-Prediction-Models - Stock-Prediction-Models, Gathers machine learning and deep learning models for Stock forecasting, included trading bots and simulations. 🌟🌟 Financial Machine Learning - A curated list of practical financial machine learning (FinML) tools and applications. This collection is primarily in Python. 🌟 Awesome-Quant-Machine-Learning-Trading - Quant / Algorithm trading resources with an emphasis on Machine Learning. awesome-quant - A curated list of insanely awesome libraries, packages and resources for Quants (Quantitative Finance). FinancePy - A Python Finance Library that focuses on the pricing and risk-management of Financial Derivatives, including fixed-income, equity, FX and credit derivatives. Explore Finance Service Libraries & Projects - Explore a curated list of Fintech popular & new libraries, top authors, trending project kits, discussions, tutorials & learning resources on kandi.

awesome-quantum-machine-learning
github
LLM Vibe Score0.64
Human Vibe Score1
krishnakumarsekarMar 27, 2025

awesome-quantum-machine-learning

Awesome Quantum Machine Learning A curated list of awesome quantum machine learning algorithms,study materials,libraries and software (by language). Table of Contents INTRODUCTION Why Quantum Machine Learning? BASICS What is Quantum Mechanics? What is Quantum Computing? What is Topological Quantum Computing? Quantum Computing vs Classical Computing QUANTUM COMPUTING Atom Structure Photon wave Electron Fluctuation or spin States SuperPosition SuperPosition specific for machine learning(Quantum Walks) Classical Bit Quantum Bit or Qubit or Qbit Basic Gates in Quantum Computing Quantum Diode Quantum Transistor Quantum Processor Quantum Registery QRAM Quantum Entanglement QUANTUM COMPUTING MACHINE LEARNING BRIDGE Complex Numbers Tensors Tensors Network Oracle Hadamard transform Hilbert Space eigenvalues and eigenvectors Schr¨odinger Operators Quantum lambda calculus Quantum Amplitute Phase Qubits Encode and Decode convert classical bit to qubit Quantum Dirac and Kets Quantum Complexity Arbitrary State Generation QUANTUM ALGORITHMS Quantum Fourier Transform Variational-Quantum-Eigensolver Grovers Algorithm Shor's algorithm Hamiltonian Oracle Model Bernstein-Vazirani Algorithm Simon’s Algorithm Deutsch-Jozsa Algorithm Gradient Descent Phase Estimation Haar Tansform Quantum Ridgelet Transform Quantum NP Problem QUANTUM MACHINE LEARNING ALGORITHMS Quantum K-Nearest Neighbour Quantum K-Means Quantum Fuzzy C-Means Quantum Support Vector Machine Quantum Genetic Algorithm Quantum Hidden Morkov Models Quantum state classification with Bayesian methods Quantum Ant Colony Optimization Quantum Cellular Automata Quantum Classification using Principle Component Analysis Quantum Inspired Evolutionary Algorithm Quantum Approximate Optimization Algorithm Quantum Elephant Herding Optimization Quantum-behaved Particle Swarm Optimization Quantum Annealing Expectation-Maximization QAUNTUM NEURAL NETWORK Quantum perceptrons Qurons Quantum Auto Encoder Quantum Annealing Photonic Implementation of Quantum Neural Network Quantum Feed Forward Neural Network Quantum Boltzman Neural Network Quantum Neural Net Weight Storage Quantum Upside Down Neural Net Quantum Hamiltonian Neural Net QANN QPN SAL Quantum Hamiltonian Learning Compressed Quantum Hamiltonian Learning QAUNTUM STATISTICAL DATA ANALYSIS Quantum Probability Theory Kolmogorovian Theory Quantum Measurement Problem Intuitionistic Logic Heyting Algebra Quantum Filtering Paradoxes Quantum Stochastic Process Double Negation Quantum Stochastic Calculus Hamiltonian Calculus Quantum Ito's Formula Quantum Stochastic Differential Equations(QSDE) Quantum Stochastic Integration Itō Integral Quasiprobability Distributions Quantum Wiener Processes Quantum Statistical Ensemble Quantum Density Operator or Density Matrix Gibbs Canonical Ensemble Quantum Mean Quantum Variance Envariance Polynomial Optimization Quadratic Unconstrained Binary Optimization Quantum Gradient Descent Quantum Based Newton's Method for Constrained Optimization Quantum Based Newton's Method for UnConstrained Optimization Quantum Ensemble Quantum Topology Quantum Topological Data Analysis Quantum Bayesian Hypothesis Quantum Statistical Decision Theory Quantum Minimax Theorem Quantum Hunt-Stein Theorem Quantum Locally Asymptotic Normality Quantum Ising Model Quantum Metropolis Sampling Quantum Monte Carlo Approximation Quantum Bootstrapping Quantum Bootstrap Aggregation Quantum Decision Tree Classifier Quantum Outlier Detection Cholesky-Decomposition for Quantum Chemistry Quantum Statistical Inference Asymptotic Quantum Statistical Inference Quantum Gaussian Mixture Modal Quantum t-design Quantum Central Limit Theorem Quantum Hypothesis Testing Quantum Chi-squared and Goodness of Fit Testing Quantum Estimation Theory Quantum Way of Linear Regression Asymptotic Properties of Quantum Outlier Detection in Quantum Concepts QAUNTUM ARTIFICIAL INTELLIGENCE Heuristic Quantum Mechanics Consistent Quantum Reasoning Quantum Reinforcement Learning QAUNTUM COMPUTER VISION QUANTUM PROGRAMMING LANGUAGES , TOOLs and SOFTWARES ALL QUANTUM ALGORITHMS SOURCE CODES , GITHUBS QUANTUM HOT TOPICS Quantum Cognition Quantum Camera Quantum Mathematics Quantum Information Processing Quantum Image Processing Quantum Cryptography Quantum Elastic Search Quantum DNA Computing Adiabetic Quantum Computing Topological Big Data Anlytics using Quantum Hamiltonian Time Based Quantum Computing Deep Quantum Learning Quantum Tunneling Quantum Entanglment Quantum Eigen Spectrum Quantum Dots Quantum elctro dynamics Quantum teleportation Quantum Supremacy Quantum Zeno Effect Quantum Cohomology Quantum Chromodynamics Quantum Darwinism Quantum Coherence Quantum Decoherence Topological Quantum Computing Topological Quantum Field Theory Quantum Knots Topological Entanglment Boson Sampling Quantum Convolutional Code Stabilizer Code Quantum Chaos Quantum Game Theory Quantum Channel Tensor Space Theory Quantum Leap Quantum Mechanics for Time Travel Quantum Secured Block Chain Quantum Internet Quantum Optical Network Quantum Interference Quantum Optical Network Quantum Operating System Electron Fractionalization Flip-Flop Quantum Computer Quantum Information with Gaussian States Quantum Anomaly Detection Distributed Secure Quantum Machine Learning Decentralized Quantum Machine Learning Artificial Agents for Quantum Designs Light Based Quantum Chips for AI Training QUANTUM STATE PREPARATION ALGORITHM FOR MACHINE LEARNING Pure Quantum State Product State Matrix Product State Greenberger–Horne–Zeilinger State W state AKLT model Majumdar–Ghosh Model Multistate Landau–Zener Models Projected entangled-pair States Infinite Projected entangled-pair States Corner Transfer Matrix Method Tensor-entanglement Renormalization Tree Tensor Network for Supervised Learning QUANTUM MACHINE LEARNING VS DEEP LEARNING QUANTUM MEETUPS QUANTUM GOOGLE GROUPS QUANTUM BASED COMPANIES QUANTUM LINKEDLIN QUANTUM BASED DEGREES CONSOLIDATED QUANTUM ML BOOKS CONSOLIDATED QUANTUM ML VIDEOS CONSOLIDATED QUANTUM ML Reserach Papers CONSOLIDATED QUANTUM ML Reserach Scientist RECENT QUANTUM UPDATES FORUM ,PAGES AND NEWSLETTER INTRODUCTION Why Quantum Machine Learning? Machine Learning(ML) is just a term in recent days but the work effort start from 18th century. What is Machine Learning ? , In Simple word the answer is making the computer or application to learn themselves . So its totally related with computing fields like computer science and IT ? ,The answer is not true . ML is a common platform which is mingled in all the aspects of the life from agriculture to mechanics . Computing is a key component to use ML easily and effectively . To be more clear ,Who is the mother of ML ?, As no option Mathematics is the mother of ML . The world tremendous invention complex numbers given birth to this field . Applying mathematics to the real life problem always gives a solution . From Neural Network to the complex DNA is running under some specific mathematical formulas and theorems. As computing technology growing faster and faster mathematics entered into this field and makes the solution via computing to the real world . In the computing technology timeline once a certain achievements reached peoples interested to use advanced mathematical ideas such as complex numbers ,eigen etc and its the kick start for the ML field such as Artificial Neural Network ,DNA Computing etc. Now the main question, why this field is getting boomed now a days ? , From the business perspective , 8-10 Years before during the kick start time for ML ,the big barrier is to merge mathematics into computing field . people knows well in computing has no idea on mathematics and research mathematician has no idea on what is computing . The education as well as the Job Opportunities is like that in that time . Even if a person tried to study both then the business value for making a product be not good. Then the top product companies like Google ,IBM ,Microsoft decided to form a team with mathematician ,a physician and a computer science person to come up with various ideas in this field . Success of this team made some wonderful products and they started by providing cloud services using this product . Now we are in this stage. So what's next ? , As mathematics reached the level of time travel concepts but the computing is still running under classical mechanics . the companies understood, the computing field must have a change from classical to quantum, and they started working on the big Quantum computing field, and the market named this field as Quantum Information Science .The kick start is from Google and IBM with the Quantum Computing processor (D-Wave) for making Quantum Neural Network .The field of Quantum Computer Science and Quantum Information Science will do a big change in AI in the next 10 years. Waiting to see that........... .(google, ibm). References D-Wave - Owner of a quantum processor Google - Quantum AI Lab IBM - Quantum Computer Lab Quora - Question Regarding future of quantum AI NASA - NASA Quantum Works Youtube - Google Video of a Quantum Processor external-link - MIT Review microsoft new product - Newly Launched Microsoft Quantum Language and Development Kit microsoft - Microsoft Quantum Related Works Google2 - Google Quantum Machine Learning Blog BBC - About Google Quantum Supremacy,IBM Quantum Computer and Microsoft Q Google Quantum Supremacy - Latest 2019 Google Quantum Supremacy Achievement IBM Quantum Supremacy - IBM Talk on Quantum Supremacy as a Primer VICE on the fight - IBM Message on Google Quantum Supremacy IBM Zurich Quantum Safe Cryptography - An interesting startup to replace all our Certificate Authority Via Cloud and IBM Q BASICS What is Quantum Mechanics? In a single line study of an electron moved out of the atom then its classical mechanic ,vibrates inside the atom its quantum mechanics WIKIPEDIA - Basic History and outline LIVESCIENCE. - A survey YOUTUBE - Simple Animation Video Explanining Great. What is Quantum Computing? A way of parallel execution of multiple processess in a same time using qubit ,It reduces the computation time and size of the processor probably in neuro size WIKIPEDIA - Basic History and outline WEBOPEDIA. - A survey YOUTUBE - Simple Animation Video Explanining Great. Quantum Computing vs Classical Computing LINK - Basic outline Quantum Computing Atom Structure one line : Electron Orbiting around the nucleous in an eliptical format YOUTUBE - A nice animation video about the basic atom structure Photon Wave one line : Light nornmally called as wave transmitted as photons as similar as atoms in solid particles YOUTUBE - A nice animation video about the basic photon 1 YOUTUBE - A nice animation video about the basic photon 2 Electron Fluctuation or spin one line : When a laser light collide with solid particles the electrons of the atom will get spin between the orbitary layers of the atom ) YOUTUBE - A nice animation video about the basic Electron Spin 1 YOUTUBE - A nice animation video about the basic Electron Spin 2 YOUTUBE - A nice animation video about the basic Electron Spin 3 States one line : Put a point on the spinning electron ,if the point is in the top then state 1 and its in bottom state 0 YOUTUBE - A nice animation video about the Quantum States SuperPosition two line : During the spin of the electron the point may be in the middle of upper and lower position, So an effective decision needs to take on the point location either 0 or 1 . Better option to analyse it along with other electrons using probability and is called superposition YOUTUBE - A nice animation video about the Quantum Superposition SuperPosition specific for machine learning(Quantum Walks) one line : As due to computational complexity ,quantum computing only consider superposition between limited electrons ,In case to merge more than one set quantum walk be the idea YOUTUBE - A nice video about the Quantum Walks Classical Bits one line : If electron moved from one one atom to other ,from ground state to excited state a bit value 1 is used else bit value 0 used Qubit one line : The superposition value of states of a set of electrons is Qubit YOUTUBE - A nice video about the Quantum Bits 1 YOUTUBE - A nice video about the Bits and Qubits 2 Basic Gates in Quantum Computing one line : As like NOT, OR and AND , Basic Gates like NOT, Hadamard gate , SWAP, Phase shift etc can be made with quantum gates YOUTUBE - A nice video about the Quantum Gates Quantum Diode one line : Quantum Diodes using a different idea from normal diode, A bunch of laser photons trigger the electron to spin and the quantum magnetic flux will capture the information YOUTUBE - A nice video about the Quantum Diode Quantum Transistors one line : A transistor default have Source ,drain and gate ,Here source is photon wave ,drain is flux and gate is classical to quantum bits QUORA -Discussion about the Quantum Transistor YOUTUBE - Well Explained Quantum Processor one line : A nano integration circuit performing the quantum gates operation sorrounded by cooling units to reduce the tremendous amount of heat YOUTUBE - Well Explained Quantum Registery QRAM one line : Comapring the normal ram ,its ultrafast and very small in size ,the address location can be access using qubits superposition value ,for a very large memory set coherent superposition(address of address) be used PDF - very Well Explained QUANTUM COMPUTING MACHINE LEARNING BRIDGE Complex Numbers one line : Normally Waves Interference is in n dimensional structure , to find a polynomial equation n order curves ,better option is complex number YOUTUBE - Wonderful Series very super Explained Tensors one line : Vectors have a direction in 2D vector space ,If on a n dimensional vector space ,vectors direction can be specify with the tensor ,The best solution to find the superposition of a n vector electrons spin space is representing vectors as tensors and doing tensor calculus YOUTUBE - Wonderful super Explained tensors basics YOUTUBE - Quantum tensors basics Tensors Network one line : As like connecting multiple vectors ,multple tensors form a network ,solving such a network reduce the complexity of processing qubits YOUTUBE - Tensors Network Some ideas specifically for quantum algorithms QUANTUM MACHINE LEARNING ALGORITHMS Quantum K-Nearest Neighbour info : Here the centroid(euclidean distance) can be detected using the swap gates test between two states of the qubit , As KNN is regerssive loss can be tally using the average PDF1 from Microsoft - Theory Explanation PDF2 - A Good Material to understand the basics Matlab - Yet to come soon Python - Yet to come soon Quantum K-Means info : Two Approaches possible ,1. FFT and iFFT to make an oracle and calculate the means of superposition 2. Adiobtic Hamiltonian generation and solve the hamiltonian to determine the cluster PDF1 - Applying Quantum Kmeans on Images in a nice way PDF2 - Theory PDF3 - Explaining well the K-means clustering using hamiltonian Matlab - Yet to come soon Python - Yet to come soon Quantum Fuzzy C-Means info : As similar to kmeans fcm also using the oracle dialect ,but instead of means,here oracle optimization followed by a rotation gate is giving a good result PDF1 - Theory Matlab - Yet to come soon Python - Yet to come soon Quantum Support Vector Machine info : A little different from above as here kernel preparation is via classical and the whole training be in oracles and oracle will do the classification, As SVM is linear ,An optimal Error(Optimum of the Least Squares Dual Formulation) Based regression is needed to improve the performance PDF1 - Nice Explanation but little hard to understand :) PDF2 - Nice Application of QSVM Matlab - Yet to come soon Python - Yet to come soon Quantum Genetic Algorithm info : One of the best algorithm suited for Quantum Field ,Here the chromosomes act as qubit vectors ,the crossover part carrying by an evaluation and the mutation part carrying by the rotation of gates ![Flow Chart]() PDF1 - Very Beautiful Article , well explained and superp PDF2 - A big theory :) PDF3 - Super Comparison Matlab - Simulation Python1 - Simulation Python2 - Yet to come Quantum Hidden Morkov Models info : As HMM is already state based ,Here the quantum states acts as normal for the markov chain and the shift between states is using quantum operation based on probability distribution ![Flow Chart]() PDF1 - Nice idea and explanation PDF2 - Nice but a different concept little Matlab - Yet to come Python1 - Yet to come Python2 - Yet to come Quantum state classification with Bayesian methods info : Quantum Bayesian Network having the same states concept using quantum states,But here the states classification to make the training data as reusable is based on the density of the states(Interference) ![Bayesian Network Sample1]() ![Bayesian Network Sample2]() ![Bayesian Network Sample3]() PDF1 - Good Theory PDF2 - Good Explanation Matlab - Yet to come Python1 - Yet to come Python2 - Yet to come Quantum Ant Colony Optimization info : A good algorithm to process multi dimensional equations, ACO is best suited for Sales man issue , QACO is best suited for Sales man in three or more dimension, Here the quantum rotation circuit is doing the peromene update and qubits based colony communicating all around the colony in complex space ![Ant Colony Optimization 1]() PDF1 - Good Concept PDF2 - Good Application Matlab - Yet to come Python1 - Yet to come Python2 - Yet to come Quantum Cellular Automata info : One of the very complex algorithm with various types specifically used for polynomial equations and to design the optimistic gates for a problem, Here the lattice is formed using the quatum states and time calculation is based on the change of the state between two qubits ,Best suited for nano electronics ![Quantum Cellular Automata]() Wikipedia - Basic PDF1 - Just to get the keywords PDF2 - Nice Explanation and an easily understandable application Matlab - Yet to come Python1 - Yet to come Python2 - Yet to come QAUNTUM NEURAL NETWORK one line : Its really one of the hardest topic , To understand easily ,Normal Neural Network is doing parallel procss ,QNN is doing parallel of parallel processess ,In theory combination of various activation functions is possible in QNN ,In Normal NN more than one activation function reduce the performance and increase the complexity Quantum perceptrons info : Perceptron(layer) is the basic unit in Neural Network ,The quantum version of perceptron must satisfy both linear and non linear problems , Quantum Concepts is combination of linear(calculus of superposition) and nonlinear(State approximation using probability) ,To make a perceptron in quantum world ,Transformation(activation function) of non linearity to certain limit is needed ,which is carrying by phase estimation algorithm ![Quantum Perceptron 3]() PDF1 - Good Theory PDF2 - Good Explanation Matlab - Yet to come Python1 - Yet to come Python2 - Yet to come QAUNTUM STATISTICAL DATA ANALYSIS one line : An under research concept ,It can be seen in multiple ways, one best way if you want to apply n derivative for a problem in current classical theory its difficult to compute as its serialization problem instead if you do parallelization of differentiation you must estimate via probability the value in all flows ,Quantum Probability Helps to achieve this ,as the loss calculation is very less . the other way comparatively booming is Quantum Bayesianism, its a solution to solve most of the uncertainity problem in statistics to combine time and space in highly advanced physical research QUANTUM PROGRAMMING LANGUAGES , TOOLs and SOFTWARES All info : All Programming languages ,softwares and tools in alphabetical order Software - Nice content of all Python library - A python library Matlab based python library - Matlab Python Library Quantum Tensor Network Github - Tensor Network Bayesforge - A Beautiful Amazon Web Service Enabled Framework for Quantum Alogorithms and Data Analytics Rigetti - A best tools repository to use quantum computer in real time Rigetti Forest - An API to connect Quantum Computer quil/pyQuil - A quantum instruction language to use forest framework Grove - Grove is a repository to showcase quantum Fourier transform, phase estimation, the quantum approximate optimization algorithm, and others developed using Forest QISKit - A IBM Kit to access quantum computer and mainly for quantum circuits IBM Bluemix Simulator - A Bluemix Simulator for Quantum Circuits Microsoft Quantum Development Kit - Microsoft Visual Studio Enbaled Kit for Quantum Circuit Creation Microsoft "Q#" - Microsoft Q Sharp a new Programming Language for Quantum Circuit Creation qiskit api python - An API to connect IBM Quantum Computer ,With the generated token its easy to connect ,but very limited utils ,Lot of new utils will come soon Cyclops Tensor Framework - A framework to do tensor network simulations Python ToolKit for chemistry and physics Quantum Algorithm simulations - A New Started Project for simulating molecule and solids Bayesian Based Quatum Projects Repository - A nice repository and the kickstarter of bayesforge Google Fermion Products - A newly launched product specifivally for chemistry simulation Tree Tensor Networks - Interesting Tensor Network in Incubator Deep Tensor Neural Network - Some useful information about Tensor Neural Network in Incubator Generative Tensorial Networks - A startup to apply machine learning via tensor network for drug discovery Google Bristlecone - A new Quantum Processor from Google , Aimed for Future Hardwares with full fledged AI support XANADU - A Light based Quantum Hardware(chips supports) and Software Company Started in Preparation Stage. Soon will be in market fathom computing - A new concept to train the ai in a processor using light and quantum based concepts. soon products will be launch Alibaba Quantum Computing Cloud Service - Cloud Service to access 11 Bit Quantum Computing Processor Atomistic Machine Learning Project - Seems something Interesting with Deep Tensor Network for Quantum Chemistry Applications circQ and Google Works - Google Top Efforts on Tools IBM Safe Cryptography on Cloud - IBM Started and Developing a Quantm Safe Cryptography to replace all our Certificate Authority via Cloud Google Tensor Network Open Source - Google Started the Most Scientist Preferred Way To Use a Quantum Computer Circuit. Tensor Flow Which Makes Easy to Design the Network and Will Leave the Work Effect Of Gates, Processor Preparation and also going to tell the beauty of Maths Google Tensor Network Github - Github Project of Google Tensor Network Quantum Tensorflow - Yet to come soon Quantum Spark - Yet to come soon Quatum Map Reduce - Yet to come soon Quantum Database - Yet to come soon Quantum Server - Yet to come soon Quantum Data Analytics - Yet to come soon QUANTUM HOT TOPICS Deep Quantum Learning why and what is deep learning? In one line , If you know deep learning you can get a good job :) ,Even a different platform undergraduated and graduated person done a master specialization in deep learning can work in this big sector :), Practically speaking machine learning (vector mathematics) , deep learning (vector space(Graphics) mathematics) and big data are the terms created by big companies to make a trend in the market ,but in science and research there is no word such that , Now a days if you ask a junior person working in this big companies ,what is deep learning ,you will get some reply as "doing linear regression with stochastic gradient for a unsupervised data using Convolutional Neural Network :)" ,They knows the words clearly and knows how to do programming using that on a bunch of "relative data" , If you ask them about the FCM , SVM and HMM etc algorithms ,they will simply say these are olden days algorithms , deep learning replaced all :), But actually they dont know from the birth to the till level and the effectiveness of algorithms and mathematics ,How many mathematical theorems in vector, spaces , tensors etc solved to find this "hiding the complexity technology", They did not played with real non relative data like medical images, astro images , geology images etc , finding a relation and features is really complex and looping over n number of images to do pattern matching is a giant work , Now a days the items mentioned as deep learning (= multiple hidden artifical neural network) is not suitable for that why quantum deep learning or deep quantum learning? In the mid of Artificial Neural Network Research people realised at the maximum extreme only certain mathematical operations possible to do with ANN and the aim of this ANN is to achieve parallel execution of many mathematical operations , In artificial Intelligence ,the world intelligence stands for mathematics ,how effective if a probem can be solvable is based on the mathematics logic applying on the problem , more the logic will give more performance(more intelligent), This goal open the gate for quantum artificial neural network, On applying the ideas behind the deep learning to quantum mechanics environment, its possible to apply complex mathematical equations to n number of non relational data to find more features and can improve the performance Quantum Machine Learning vs Deep Learning Its fun to discuss about this , In recent days most of the employees from Product Based Companies Like google,microsoft etc using the word deep learning ,What actually Deep Learning ? and is it a new inventions ? how to learn this ? Is it replacing machine learning ? these question come to the mind of junior research scholars and mid level employees The one answer to all questions is deep learning = parallel "for" loops ,No more than that ,Its an effective way of executing multiple tasks repeatly and to reduce the computation cost, But it introduce a big cap between mathematics and computerscience , How ? All classical algorithms based on serial processing ,Its depends on the feedback of the first loop ,On applying a serial classical algorithm in multiple clusters wont give a good result ,but some light weight parallel classical algorithms(Deep learning) doing the job in multiple clusters and its not suitable for complex problems, What is the solution for then? As in the title Quantum Machine Learning ,The advantage behind is deep learning is doing the batch processing simply on the data ,but quantum machine learning designed to do batch processing as per the algorithm The product companies realised this one and they started migrating to quantum machine learning and executing the classical algorithms on quantum concept gives better result than deep learning algorithms on classical computer and the target to merge both to give very wonderful result References Quora - Good Discussion Quora - The Bridge Discussion Pdf - Nice Discussion Google - Google Research Discussion Microsoft - Microsoft plan to merge both IBM - IBM plan to merge both IBM Project - IBM Project idea MIT and Google - Solutions for all questions QUANTUM MEETUPS Meetup 1 - Quantum Physics Meetup 2 - Quantum Computing London Meetup 3 - Quantum Computing New York Meetup 4 - Quantum Computing Canada Meetup 5 - Quantum Artificial Intelligence Texas Meetup 6 - Genarl Quantum Mechanics , Mathematics New York Meetup 7 - Quantum Computing Mountain View California Meetup 8 - Statistical Analysis New York Meetup 9 - Quantum Mechanics London UK Meetup 10 - Quantum Physics Sydney Australia Meetup 11 - Quantum Physics Berkeley CA Meetup 12 - Quantum Computing London UK Meetup 13 - Quantum Mechanics Carmichael CA Meetup 14 - Maths and Science Group Portland Meetup 15 - Quantum Physics Santa Monica, CA Meetup 16 - Quantum Mechanics London Meetup 17 - Quantum Computing London Meetup 18 - Quantum Meta Physics ,Kansas City , Missouri ,US Meetup 19 - Quantum Mechanics and Physics ,Boston ,Massachusetts ,US Meetup 20 - Quantum Physics and Mechanics ,San Francisco ,California Meetup 21 - Quantum Mechanics ,Langhorne, Pennsylvania Meetup 22 - Quantum Mechanics ,Portland QUANTUM BASED DEGREES Plenty of courses around the world and many Universities Launching it day by day ,Instead of covering only Quantum ML , Covering all Quantum Related topics gives more idea in the order below Available Courses Quantum Mechanics for Science and Engineers Online Standford university - Nice Preparatory Course edx - Quantum Mechanics for Everyone NPTEL 1 - Nice Series of Courses to understand basics and backbone of quantum mechanics NPTEL 2 NPTEL 3 NPTEL 4 NPTEL 5 Class Based Course UK Bristol Australia Australian National University Europe Maxs Planks University Quantum Physics Online MIT - Super Explanation and well basics NPTEL - Nice Series of Courses to understand basics and backbone of quantum Physics Class Based Course Europe University of Copenhagen Quantum Chemistry Online NPTEL 1 - Nice Series of Courses to understand basics and backbone of quantum Chemistry NPTEL 2 - Class Based Course Europe UGent Belgium Quantum Computing Online MIT - Super Explanation and well basics edx - Nice Explanation NPTEL - Nice Series of Courses to understand basics and backbone of quantum Computing Class Based Course Canada uwaterloo Singapore National University Singapore USA Berkley China Baidu Quantum Technology Class Based Course Canada uwaterloo Singapore National University Singapore Europe Munich Russia Skoltech Quantum Information Science External Links quantwiki Online MIT - Super Explanation and well basics edx - Nice Explanation NPTEL - Nice Series of Courses to understand basics and backbone of quantum information and computing Class Based Course USA MIT Standford University Joint Center for Quantum Information and Computer Science - University of Maryland Canada Perimeter Institute Singapore National University Singapore Europe ULB Belgium IQOQI Quantum Electronics Online MIT - Wonderful Course NPTEL - Nice Series of Courses to understand basics and backbone of quantum Electronics Class Based Course USA Texas Europe Zurich ICFO Asia Tata Institute Quantum Field Theory Online Standford university - Nice Preparatory Course edx - Some QFT Concepts available Class Based Course UK Imperial Europe Vrije Quantum Computer Science Class Based Course USA Oxford Joint Center for Quantum Information and Computer Science - University of Maryland Quantum Artificial Intelligence and Machine Learning External Links Quora 1 Quora 1 Artificial Agents Research for Quantum Designs Quantum Mathematics Class Based Course USA University of Notre CONSOLIDATED Quantum Research Papers scirate - Plenty of Quantum Research Papers Available Peter Wittek - Famous Researcher for the Quantum Machine Leanrning , Published a book in this topic [Murphy Yuezhen Niu] (https://scholar.google.com/citations?user=0wJPxfkAAAAJ&hl=en) - A good researcher published some nice articles Recent Quantum Updates forum ,pages and newsletter Quantum-Tech - A Beautiful Newsletter Page Publishing Amazing Links facebook Quantum Machine Learning - Running By me . Not that much good :). You can get some ideas Linkedlin Quantum Machine Learning - A nice page running by experts. Can get plenty of ideas FOSDEM 2019 Quantum Talks - A one day talk in fosdem 2019 with more than 10 research topics,tools and ideas FOSDEM 2020 Quantum Talks - Live talk in fosdem 2020 with plenty new research topics,tools and ideas License Dedicated Opensources ![Dedicated Opensources]() Source code of plenty of Algortihms in Image Processing , Data Mining ,etc in Matlab, Python ,Java and VC++ Scripts Good Explanations of Plenty of algorithms with flow chart etc Comparison Matrix of plenty of algorithms Is Quantum Machine Learning Will Reveal the Secret Maths behind Astrology? Awesome Machine Learning and Deep Learning Mathematics is online Published Basic Presentation of the series Quantum Machine Learning Contribution If you think this page might helpful. Please help for World Education Charity or kids who wants to learn

eiten
github
LLM Vibe Score0.549
Human Vibe Score0.754375921646308
tradyticsMar 27, 2025

eiten

Eiten - Algorithmic Investing Strategies for Everyone Eiten is an open source toolkit by Tradytics that implements various statistical and algorithmic investing strategies such as Eigen Portfolios, Minimum Variance Portfolios, Maximum Sharpe Ratio Portfolios, and Genetic Algorithms based Portfolios. It allows you to build your own portfolios with your own set of stocks that can beat the market. The rigorous testing framework included in Eiten enables you to have confidence in your portfolios. If you are looking to discuss these tools in depth and talk about more tools that we are working on, please feel free to join our Discord channel where we have a bunch of more tools too. Files Description | Path | Description | :--- | :---------- | eiten | Main folder. | └ figures | Figures for this github repositories. | └ stocks | Folder to keep your stock lists that you want to use to create your portfolios. | └ strategies | A bunch of strategies implemented in python. | backtester.py | Backtesting module that both backtests and forward tests all portfolios. | data_loader.py | Module for loading data from yahoo finance. | portfolio_manager.py | Main file that takes in a bunch of arguments and generates several portfolios for you. | simulator.py | Simulator that uses historical returns and monte carlo to simulate future prices for the portfolios. | strategy_manager.py | Manages the strategies implemented in the 'strategies' folder. Required Packages You will need to install the following package to train and test the models. Scikit-learn Numpy Tqdm Yfinance Pandas Scipy You can install all packages using the following command. Please note that the script was written using python3. Build your portfolios Let us see how we can use all the strategies given in the toolkit to build our portfolios. The first thing you need to do is modify the stocks.txt file in the stocks folder and add the stocks of your choice. It is recommended to keep the list small i.e anywhere between 5 to 50 stocks should be fine. We have already put a small stocks list containing a bunch of tech stocks like AAPL, MSFT, TSLA etc. Let us build our portfolios now. This is the main command that you need to run. This command will use last 5 years of daily data excluding the last 90 days and build several portfolios for you. Based on those portfolios, it will then test them on the out of sample data of 90 days and show you the performance of each portfolio. Finally, it will also compare the performance with your choice of market index which is QQQ here. Let's dive into each of the parameters in detail. istest: The value determined if the program is going to keep some separate data for future testing. When this is enabled, the value of futurebars should be larger than 5. future_bars: These are the bars that the tool will exclude during portfolio building and will forward test the portfolios on the excluded set. This is also called out of sample data. datagranularityminutes: How much granular data do you want to use to build your portfolios. For long term portfolios, you should use daily data but for short term, you can use hourly or minute level data. The possible values here are 3600, 60, 30, 15, 5, 1. 3600 means daily. historytouse: Whether to use a specific number of historical bars or use everything that we receive from yahoo finance. For minute level data, we only receive up to one month of historical data. For daily, we receive 5 years worth of historical data. If you want to use all available data, the value should be all but if you want to use smaller history, you can set it to an integer value e.g 100 which will only use the last 100 bars to build the portfolios. applynoisefiltering: This uses random matrix theory to filter out the covariance matrix from randomness thus yielding better portfolios. A value of 1 will enable it and 0 will disable it. market_index: Which index do you want to use to compare your portfolios. This should mostly be SPY but since we analyzed tech stocks, we used QQQ. only_long: Whether to use long only portfolio or enable short selling as well. Long only portfolios have shown to have better performance using algorithmic techniques. eigenportfolionumber: Which eigen portfolio to use. Any value between 1-5 should work. The first eigen portfolio (1) represents the market portfolio and should act just like the underlying index such as SPY or QQQ. The second one is orthogonal and uncorrelated to the market and poses the greatest risk and reward. The following ones have reduced risk and reward. Read more on eigen-portfolios. stocksfilepath: File that contains the list of stocks that you want to use to build your portfolio. Some Portfolio Building Examples Here are a few examples for building different types of portfolios. Both long and short portfolios by analyzing last 90 days data and keeping the last 30 days as testing data. This will give us 60 days of portfolio construction data and 30 days of testing. Only long portfolio on 60 minute bars of the last 30 days. No future testing. Compare the results with SPY index instead of QQQ. Do not apply noise filtering on the covariance matrix. Use the first eigen portfolio (market portfolio) and compare with SQQQ, Portfolio Strategies Four different portfolio strategies are currently supported by the toolkit. Eigen Portfolios These portfolios are orthogonal and uncorrelated to the market in general thus yielding high reward and alpha. However, since they are uncorrelated to the market, they can also provide great risk. The first eigen portfolio is considered to be a market portfolio which is often ignored. The second one is uncorrelated to the others and provides the highest risk and reward. As we go down the numbering, the risk as well as the reward are reduced. Minimum Variance Portfolio (MVP) MVP tries to minimize the variance of the portfolio. These portfolios are lowest risk and reward. Maximum Sharpe Ratio Portfolio (MSR) MSR solves an optimization problem that tries to maximize the sharpe ratio of the portfolio. It uses past returns during the optimization process which means if past returns are not the same as future returns, the results can vary in future. Genetic Algorithm (GA) based Portfolio This is our own implementation of a GA based portfolio that again tries to maximize the sharpe ratio but in a slightly more robust way. This usually provides more robust portfolios than the others. When you run the command above, our tool will generate portfolios from all these strategies and give them to you. Let us look at some resulting portfolios. Resulting Portfolios For the purpose these results, we will use the 9 stocks in the stocks/stocks.txt file. When we run the above command, we first get the portfolio weights for all four strategies. For testing purposes, the above command used last five years of daily data up till April 29th. The remaining data for this year was used for forward testing i.e the portfolio strategies had no access to it when building the portfolios. What if my portfolio needs different stocks?: All you need to do is change the stocks in the stocks.txt file and run the tool again. Here is the final command again that we run in order to get our portfolios: Portfolio Weights We can see that the eigen portfolio is giving a large weight to TSLA while the others are dividing their weights more uniformly. An interesting phenomena happening here is the hedging with SQQQ that all the strategies have learned automatically. Every tool is assigning some positive weight to SQQQ while also assigning positive weights to other stocks which indicates that the strategies are automatically trying to hedge the portfolios from risk. Obviously this is not perfect, but just the fact that it's happening is fascinating. Let us look at the backtest results on the last five years prior to April 29, 2020. Backtest Results The backtests look pretty encouraging. The black dotted line is the market index i.e QQQ. Other lines are the strategies. Our custom genetic algorithm implementation seems to have the best backtest results because it's an advanced version of other strategies. The eigen portfolio that weighed TSLA the most have the most volatility but its profits are also very high. Finally, as expected, the MVP has the minimum variance and ultimately the least profits. However, since the variance is extremely low, it is a good portfolio for those who want to stay safe. The most interesting part comes next, let us look at the forward or future test results for these portfolios. Forward Test Results These results are from April 29th, 2020 to September 4th, 2020. The eigen portfolio performed the best but it also had a lot of volatility. Moreover, most of those returns are due to TSLA rocketing in the last few months. After that, our GA algorithm worked quite effectively as it beat the market index. Again, as expected, the MVP had the lowest risk and reward and slowly went up in 4-5 months. This shows the effectiveness and power of these algorithmic portfolio optimization strategies where we've developed different portfolios for different kinds of risk and reward profiles. Conclusion and Discussion We are happy to share this toolkit with the trading community and hope that people will like and contribute to it. As is the case with everything in trading, these strategies are not perfect but they are based on rigorous theory and some great empirical results. Please take care when trading with these strategies and always manage your risk. The above results were not cherry picked but the market has been highly bullish in the last few months which has led to the strong results shown above. We would love for the community to try out different strategies and share them with us. Special Thanks Special thanks to Scott Rome's blog. The eigen portfolios and minimum variance portfolio concepts came from his blog posts. The code for filtering eigen values of the covariance matrix was also mostly obtained from one of his posts. License A product by Tradytics Copyright (c) 2020-present, Tradytics.com

machine-learning-blackjack-solution
github
LLM Vibe Score0.42
Human Vibe Score0.022610872675250356
GregSommervilleMar 27, 2025

machine-learning-blackjack-solution

machine-learning-blackjack-solution Introduction A genetic algorithm is a type of artificial intelligence programming that uses ideas from evolution to solve complex problems. It works by creating a population of (initially random) candidate solutions, then repeatedly selecting pairs of candidates and combining their solutions using a process similar to genetic crossover. Sometimes candidate solutions even go through mutation, just to introduce new possibilities into the population. After a large number of generations, the best solution found up to that point is often the optimal, best solution possible. Genetic algorithms are particularly well-suited for combinatorial problems, where there are huge numbers of potential solutions to a problem. The evolutionary process they go through is, in essence, a search through a huge solution space. A solution space so large that you simply could never use a brute force approach. This project is a demonstration of using a genetic algorithm to find an optimal strategy for playing the casino game Blackjack. Please see this article for a story about how this program was used, and what the results were. The article describes some of the available settings, and shows how different values for those settings affect the final result. The source code is for a Windows application written in Cthat allows you to play with different settings like population size, selection style and mutation rate. Each generation's best solution is displayed, so you can watch the program literally evolve a solution. !blackjack strategy tester screenshot The property grid located at the upper left of the screen is where you adjust settings. There's an informational area below that, and the right side of the screen is the display area for the three tables that represent a strategy for playing Blackjack. The tall table on the left is for hard hands, the table in the upper right is for soft hands, and the table in the lower right is for pairs. We'll talk more about how to interpret this strategy in a bit. The columns along the tops of the three tables are for the dealer upcard. When you play Blackjack the dealer has one of his two cards initially turned face up, and the rank of that card has a big impact on recommended strategy. Notice that the upcard ranks don't include Jack, Queen or King. That's because those cards all count 10, so we group them and the Ten together and simplify the tables. To use the tables, first, determine if you have a pair, soft hand, or hard hand. Then look in the appropriate table, with the correct dealer upcard column. The cell in the table will be "H" when the correct strategy is to hit, "S" when the correct strategy is to stand, "D" for double-down, and (in the pairs table only) "P" for split. A Word About This "Optimal" Strategy Before we go any further, it needs to be stated that this problem of finding an optimal Blackjack strategy has already been solved. Back in the 1960s, a mathematician named Edward O. Thorp authored a book called Beat the Dealer, which included charts showing the optimal "Basic" strategy. That strategy looks like this: !optimal blackjack strategy So we're solving a problem that has already been solved, but that's actually good. That means we can compare our results to the known best solution. For example, if our result strategy tells us to do anything but stand when holding a pair of Tens, Jacks, Queens or Kings, we know there's a problem. There's one other thing to get out of the way before we go any further, and that's the idea of nondeterministic code. That means that if we run the same code twice in a row, we're likely to get two different results. That's something that happens with genetic algorithms due to their inherent randomness. There's no guarantee you'll find the absolute optimal solution, but it is assured that you will find an optimal or near-optimal solution. It's something that isn't typical when writing code, so it takes some adjustment for most programmers. Genetic Algorithms Now let's talk about the details of a genetic algorithm. Fitness Scores First of all, we need a way to evaluate candidates so we can compare them to each other. That means a numeric fitness score, which in this case is quite simple: you simulate playing a certain number of hands using the strategy, and then count the number of chips you have at the end. The big question is, how many hands should we test with? The challenge of trying to test a strategy is that due to the innate randomness of Blackjack, you could use the same strategy ten times and get ten completely different results. Obviously, the more hands you play, the more the randomness gets smoothed out, and the quality of the underlying strategy starts to emerge. If you doubt this, just think about flipping a coin. If you only flip it five times, there's certainly a possibility that it'll come up heads all five times (in fact, that happens just over 3% of the time). However, if you flip it 500 times, there's no way it's going to end up all heads - the odds of it happening are 0.5500, which works out to be roughly once every 3 x 10150 times you try it. After some testing and analysis, it was determined that a minimum of 100,000 hands per test is needed for a reasonable level of accuracy. There's still variance even at that number, but in order to cut the variance in half, you'd need to bump the number of hands to 500,000. One reason this accuracy is important is that in the later generations, the differences between candidates are very small. Evolution has caused the main parts of the strategy to converge on a particular approach, and towards the end all it's doing is refining the minor details. In those cases it's important to accurately determine the difference between two similar candidates. Representation Representation is simply the idea that we need to use a data structure for a candidate solution that can be combined via crossover, and possibly mutated. In this case, that's also quite simple because the way that human beings represent a Blackjack strategy is to use three tables, as we've seen. Representing those in code with three two-dimensional arrays is the obvious approach. Each cell in those three tables will have "Hit", "Stand", "Double-Down", or (only for pairs) "Split". By the way, since there are 160 cells in the hard hands table, and 80 cells in the soft hands table, and 100 cells in the pairs table, we can calculate exactly how many possible distinct strategies there are for Blackjack: 4100 x 380 x 3160 = 5 x 10174 possible Blackjack strategies That's a big number, which is obviously impossible to search using brute force. Genetic algorithms (GAs) are extremely helpful when trying to find an optimal solution from a very large set of possible solutions like this. Blackjack Rules and Strategies The rules of Blackjack are fairly simple. The dealer and the player both are dealt two cards. The player sees both of their cards (they are usually dealt face up), and one of the dealer's cards is dealt face up. Each card has a value - for cards between 2 and 10, the value is the same as the card's rank (so an Eight of Spades counts as 8, for example). All face cards count as 10, and an Ace can either be 1 or 11 (it counts as 11 only when that does not result in a hand that exceeds 21). The suit of a card does not matter. After the cards are dealt, if the player has Blackjack (a total of 21) and the dealer does not, the player is immediately paid 1.5 times their original bet, and a new hand is dealt. If the player has 21 and the dealer does also, then it's a tie and the player gets their original bet back, and a new hand is dealt. If the player wasn't dealt a Blackjack, then play continues with the player deciding whether to Stand (not get any more cards), Hit (receive an additional card), Double-down (place an additional bet, and receive one and only one more card), or, in the case of holding a pair, splitting the hand, which means placing an additional bet and receiving two new cards, so the end result is that the player is now playing two (or, in the case of multiple splits, more than two) hands simultaneously. If the player hits or double-downs and has a resulting hand that exceeds 21, then they lose and play continues with the next hand. If not, then the dealer draws until their hand totals at least 17. If the dealer exceeds 21 at this point, the player receives a payment equal to twice their original bet. If the dealer doesn't exceed 21, then the hands are compared and the player with the highest total that doesn't exceed 21 wins. Because of these rules, certain effective strategies emerge. One common strategy is that if you hold a hard hand with a value of 20, 19 or 18, you should Stand, since you avoid busting by going over 21, and you have a nice hand total that might win in a showdown with the dealer. Another common strategy is to split a pair of Aces, since Aces are so powerful (due to the fact that count as 11 or 1, you can often Hit a hand with a soft Ace with no risk of busting). Likewise, splitting a pair of 8s is a good idea because with a hard total of 16, it's likely you will bust if you take a Hit (since so many cards count as 10). As a human being, all it takes is a little knowledge about the rules in order to construct a strategy. The GA program doesn't have that advantage, and operates completely without any pre-programmed knowledge of Blackjack. It simply uses the relative fitness scores and the mechanism of evolution to find the solution. GA Settings There are many variables or settings for a GA. You can adjust population size, how parent candidates are selected, how the resulting children may be mutated, and several other items. The following sections describe some of these settings: Setting: Selection Style Once we've solved representation and have a fitness function, the next step is to select two candidates for crossover during the process of building a new generation. There are three common styles for selection, and this program supports all of them. First, you can choose Roulette Wheel selection. It's named for a Roulette wheel because you can imagine each candidate's fitness score being a wedge in a pie chart, with a size proportionate to its relative fitness compared to the other candidates. (Of course, this assumes that all fitness scores are positive, which we will talk about shortly). The main benefit of Roulette Wheel selection is that selection is fitness-proportionate. Imagine if you had only three candidates, with fitness scores of 1, 3, and 8. The relative selection probabilities for those candidates will be 1/12, 3/12, and 8/12. The downside of Roulette Wheel selection is that it tends to be somewhat slow in terms of processing. The selection process is done by iterating through the candidates until a particular condition is matched - in other words, O(N) performance. Another potential problem with Roulette Wheel selection is that there may be situations where fitness scores vary widely, to such an extent that only certain candidates have any reasonable chance of being selected. This happens frequently in early generations, since the majority of candidates are mostly random. Although this might sound like a positive (since you ultimately want to select candidates with high fitness scores), it also results in a loss of genetic diversity. In other words, even though a particular candidate may have a low fitness score in an early generation, it may contain elements that are needed to find the ultimate solution in later generations. Ranked Selection is the solution to this problem. Instead of using raw fitness scores during the selection process, the candidates are sorted by fitness, with the worst candidate receiving a score of 0, the second worse receiving 1, and so forth, all the way to the best candidate, which has a score equal to the population size - 1. Ranked Selection is quite slow, since it combines the O(N) performance of Roulette Wheel, with the additional requirement that the candidates be sorted before selection. However, there may be circumstances where it performs better than other selection approaches. Finally, the fastest selection method of all is called Tournament Selection. This method simply selects N random candidates from the current generation, and then uses the one with the best fitness score. A tournament size of 2 means two random candidates are selected, and the best of those two is used. If you have a large tournament size (like 10), then 10 different candidates will be selected, with the best of those being the ultimate selection. That obviously tilts the balance between randomness and quality. Tournament selection works well in most cases, but it does require some experimentation to find the best tourney size. Setting: Elitism Elitism is a technique that helps ensure that the best candidates are always maintained. Since all selection methods are random to some degree, it is possible to completely lose the best candidates from one generation to another. By using Elitism, we automatically advance a certain percentage of the best candidates to the next generation. Elitism does have a negative impact on performance since all of the candidates must be sorted by fitness score. Typically Elitism is done before filling the rest of a new generation with new candidates created by crossover. Crossover Details Once two candidate solutions have been selected, the next step in building a new generation is to combine those two into a single new candidate, hopefully using the best of both parent strategies. There are a number of ways to do crossover, but the method used in this program is quite straightforward - the two fitness scores are compared, and crossover happens in a relatively proportionate way. If one candidate has a fitness of 10, and the other has a fitness of 5, then the one with fitness 10 contributes twice as much to the child as the parent with a fitness of 5. Since the fitness scores in this program are based on how much the strategy would win over thousands of hands, almost all fitness scores will be negative. (This is obviously because the rules are set up so the house always wins.) This makes it difficult to calculate relative fitnesses (how do you compare a positive number with a negative, and find relative proportions?), and also causes problems with selection methods like Roulette Wheel or Ranked. To solve this, we find the lowest fitness score of the generation and add that value to each candidate. This results in an adjusted fitness score of 0 for the very worse candidate, so it never gets selected. Mutation As has been mentioned a few times, maintaining genetic diversity in our population of candidate solutions is a good thing. It helps the GA ultimately find the very best solution, by occasionally altering a candidate in a positive direction. There are two settings for mutation. MutationRate controls what percentage of new candidates have mutation done on them. MutationImpact controls what percentage of their strategy is randomized. Population Size Population size has a significant impact on performance. The smaller the population size, the faster the GA will execute. On the other hand, if the size is too low the population may not have enough genetic diversity to find the ultimate solution. During testing, it looks like 700 to 1000 is a good balance between speed and correctness. Performance Notes This program consumes a lot of processing power. Running tests of hundreds of thousands of hands of Blackjack for hundreds or thousands of candidates consumes a lot of time. It's really imperative to write the code so that it works as efficiently as possible. If your CPU isn't consistently at or above 95% usage, there's still room for improvement. Multi-threading is a natural fit for genetic algorithms because we often want to perform the same action on each candidate. The best example of this is when we calculate fitness scores. This is often an operation that takes quite a bit of time. In our case, we're dealing out 100,000 hands, and each hand has to be played until the end. If we're single-threading that code, it's going to take a long time. Multi-threading is really the way to go. Luckily, there's a ridiculously simple way to efficiently use all of your processors for an operation like this. This code loops over all of the candidates in the currentGeneration list, calls the fitness function and sets the fitness property for each: Regardless of the number of items in the list or the number of processors on your machine, the code will efficiently run the code in a multi-threaded manner, and continue only when all of the threads are complete. One of the side effects of making this code multi-threaded is that all of the code relating to evaluating a candidate must be thread-safe, including any Singleton objects. When making code thread-safe, pay attention that you don't accidentally introduce code that will slow your program down unintentionally, because sometimes it can be quite subtle. Random numbers are central to how genetic algorithms work, so it's critical that they can be used correctly from a multithreaded environment. That means that each random number generator must be separate from the others, and it also means that each must produce a distinct series of random numbers. Random number generators use seed values which are usually time-based, like the number of milliseconds the computer has been turned on. Starting with that seed, subsequent calls will return a series of numbers that look random, but really aren't. If you start with the same seed, you get the same sequence. And that's a problem because if you create multiple random number generator objects in a loop using the default time-based seed, several of them will have the same time-based initial seed value, which will result in the same sequence of "random" numbers. That's a bug, because it can reduce the true randomness of the program a great deal, and that's vital to a genetic algorithm. There are a couple of ways to solve this problem. First, you can make the random object truly a singleton, and restrict access to it by using a Clock statement. The makes all access serialized for any random number need, which reduces performance. Another approach is to make the variable static per thread. By declaring the variable as static and also marking it with the [ThreadStatic] attribute, the .NET runtime allocates one static variable per thread. That eliminates the locking/serialization, but also has performance issues. The approach used in this application is to use a non-default seed value. In this case we call Guid.NewGuid().GetHashCode(), which generates a new, unique GUID, then gets an integer hashcode value that should be unique, depending on how GetHashCode is implemented. While multithreading really helps performance, there are also other things we can do to improve performance. For example, when dealing with large populations, the hundreds or thousands of objects that will be generated each generation can quickly turn into a huge problem related to garbage collection. In the end, the easiest way to solve that is to look through the code and find objects being allocate inside a loop. It's better to declare the variable outside of the loop, and then clear it in the loop, rather than reallocate it. In a program like this one where you could be looping hundreds of thousands of times, this can result in a very significant performance boost. For example, in an early version of this code, a Deck object was created for each hand. Since there are hundreds of candidate solutions running hundreds of thousands of trial hands, this was a huge inefficiency. The code was changed to allocate one deck per test sequence. The deck was shuffled as needed, so it never needs to be reallocated. Beyond the cards in the deck, another object type that was repeatedly created and destroyed were the candidate strategies. To mitigate this problem, a StrategyPool class was created that handles allocation and deallocation. This means that strategy objects are reused, rather than dynamically created when needed. The pool class has to be thread-safe, so it does serialize access to its methods via a Clock statement, but overall using the pool approach produced a good performance increase. Finally, a subtle form of object allocation is conversion. In an early version of the code, a utility card function used Convert.ToInt32(rankEnum). Obviously, the easiest way to convert from an enum to an int is simply to cast it, like (int)rankEnum. But it's hard to know exactly what the difference is between that approach, int.Parse(), int.TryParse(), or Convert.ToInt32(), since they can all be used and are roughly equivalent. Perhaps the compiler was boxing the enum value before passing it to Convert.ToInt32(), because the profiler identified this as a function that had large amounts of thread contention waiting - and the problem got much, much worse as the generations passed. By rewriting the conversion to use a simple cast, the program performance increased threefold (3x). Contributing Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us. Author Greg Sommerville - Initial work* License This project is licensed under the Apache 2.0 License - see the LICENSE.md file for details

aima-java
github
LLM Vibe Score0.521
Human Vibe Score0.06620214044837505
aimacodeMar 25, 2025

aima-java

AIMA3e-Java (JDK 8+) Java implementation of algorithms from Russell and Norvig's Artificial Intelligence - A Modern Approach 3rd Edition. You can use this in conjunction with a course on AI, or for study on your own. We're looking for solid contributors to help. Getting Started Links Overview of Project Interested in Contributing Setting up your own workspace Comments on architecture and design Demo Applications that can be run from your browser (unfortunately not up to date) Javadoc for the aima-core project (outdated) Download the latest official (but outdated) version = 1.9.1 (Dec 18 2016) Latest Maven Information (for integration as a third party library) Index of Implemented Algorithms |Figure|Page|Name (in 3rd edition)|Code | -------- |:--------:| :-----| :----- | |2|34|Environment|Environment| |2.1|35|Agent|Agent| |2.3|36|Table-Driven-Vacuum-Agent|TableDrivenVacuumAgent| |2.7|47|Table-Driven-Agent|TableDrivenAgentProgram| |2.8|48|Reflex-Vacuum-Agent|ReflexVacuumAgent| |2.10|49|Simple-Reflex-Agent|SimpleReflexAgentProgram| |2.12|51|Model-Based-Reflex-Agent|ModelBasedReflexAgentProgram| |3|66|Problem|Problem| |3.1|67|Simple-Problem-Solving-Agent|SimpleProblemSolvingAgent| |3.2|68|Romania|SimplifiedRoadMapOfRomania| |3.7|77|Tree-Search|TreeSearch| |3.7|77|Graph-Search|GraphSearch| |3.10|79|Node|Node| |3.11|82|Breadth-First-Search|BreadthFirstSearch| |3.14|84|Uniform-Cost-Search|UniformCostSearch| |3|85|Depth-first Search|DepthFirstSearch| |3.17|88|Depth-Limited-Search|DepthLimitedSearch| |3.18|89|Iterative-Deepening-Search|IterativeDeepeningSearch| |3|90|Bidirectional search|BidirectionalSearch| |3|92|Best-First search|BestFirstSearch| |3|92|Greedy best-First search|GreedyBestFirstSearch| |3|93|A\* Search|AStarSearch| |3.26|99|Recursive-Best-First-Search |RecursiveBestFirstSearch| |4.2|122|Hill-Climbing|HillClimbingSearch| |4.5|126|Simulated-Annealing|SimulatedAnnealingSearch| |4.8|129|Genetic-Algorithm|GeneticAlgorithm| |4.11|136|And-Or-Graph-Search|AndOrSearch| |4|147|Online search problem|OnlineSearchProblem| |4.21|150|Online-DFS-Agent|OnlineDFSAgent| |4.24|152|LRTA\*-Agent|LRTAStarAgent| |5.3|166|Minimax-Decision|MinimaxSearch| |5.7|170|Alpha-Beta-Search|AlphaBetaSearch| |6|202|CSP|CSP| |6.1|204|Map CSP|MapCSP| |6.3|209|AC-3|AC3Strategy| |6.5|215|Backtracking-Search|AbstractBacktrackingSolver| |6.8|221|Min-Conflicts|MinConflictsSolver| |6.11|224|Tree-CSP-Solver|TreeCspSolver| |7|235|Knowledge Base|KnowledgeBase| |7.1|236|KB-Agent|KBAgent| |7.7|244|Propositional-Logic-Sentence|Sentence| |7.10|248|TT-Entails|TTEntails| |7|253|Convert-to-CNF|ConvertToCNF| |7.12|255|PL-Resolution|PLResolution| |7.15|258|PL-FC-Entails?|PLFCEntails| |7.17|261|DPLL-Satisfiable?|DPLLSatisfiable| |7.18|263|WalkSAT|WalkSAT| |7.20|270|Hybrid-Wumpus-Agent|HybridWumpusAgent| |7.22|272|SATPlan|SATPlan| |9|323|Subst|SubstVisitor| |9.1|328|Unify|Unifier| |9.3|332|FOL-FC-Ask|FOLFCAsk| |9.6|338|FOL-BC-Ask|FOLBCAsk| |9|345|CNF|CNFConverter| |9|347|Resolution|FOLTFMResolution| |9|354|Demodulation|Demodulation| |9|354|Paramodulation|Paramodulation| |9|345|Subsumption|SubsumptionElimination| |10.9|383|Graphplan|GraphPlan| |11.5|409|Hierarchical-Search|HierarchicalSearchAlgorithm| |11.8|414|Angelic-Search|---| |13.1|484|DT-Agent|DT-Agent| |13|484|Probability-Model|ProbabilityModel| |13|487|Probability-Distribution|ProbabilityDistribution| |13|490|Full-Joint-Distribution|FullJointDistributionModel| |14|510|Bayesian Network|BayesianNetwork| |14.9|525|Enumeration-Ask|EnumerationAsk| |14.11|528|Elimination-Ask|EliminationAsk| |14.13|531|Prior-Sample|PriorSample| |14.14|533|Rejection-Sampling|RejectionSampling| |14.15|534|Likelihood-Weighting|LikelihoodWeighting| |14.16|537|GIBBS-Ask|GibbsAsk| |15.4|576|Forward-Backward|ForwardBackward| |15|578|Hidden Markov Model|HiddenMarkovModel| |15.6|580|Fixed-Lag-Smoothing|FixedLagSmoothing| |15|590|Dynamic Bayesian Network|DynamicBayesianNetwork| |15.17|598|Particle-Filtering|ParticleFiltering| |16.9|632|Information-Gathering-Agent|InformationGatheringAgent| |17|647|Markov Decision Process|MarkovDecisionProcess| |17.4|653|Value-Iteration|ValueIteration| |17.7|657|Policy-Iteration|PolicyIteration| |17.9|663|POMDP-Value-Iteration|POMDPValueIteration| |18.5|702|Decision-Tree-Learning|DecisionTreeLearner| |18.8|710|Cross-Validation-Wrapper|CrossValidation| |18.11|717|Decision-List-Learning|DecisionListLearner| |18.24|734|Back-Prop-Learning|BackPropLearning| |18.34|751|AdaBoost|AdaBoostLearner| |19.2|771|Current-Best-Learning|CurrentBestLearning| |19.3|773|Version-Space-Learning|VersionSpaceLearning| |19.8|786|Minimal-Consistent-Det|MinimalConsistentDet| |19.12|793|FOIL|FOIL| |21.2|834|Passive-ADP-Agent|PassiveADPAgent| |21.4|837|Passive-TD-Agent|PassiveTDAgent| |21.8|844|Q-Learning-Agent|QLearningAgent| |22.1|871|HITS|HITS| |23.5|894|CYK-Parse|CYK| |25.9|982|Monte-Carlo-Localization|MonteCarloLocalization| Index of implemented notebooks |Chapter No|Name |Status (in 3rd edition)|Status (in 4th edition) | -------- |:--------:| :-----| :----- | |3| Solving Problems by Searching| In Progress| Not started| |6| Constraint Satisfaction Problems |In Progress|---| |12| Knowledge Representation|Done|---| |13| Quantifying Uncertainty |Done | --- | |14| Probabilistic Reasoning|In Progress| ---| Before starting to work on a new notebook: Open a new issue with the following heading: Notebook: Chapter Name - Version . Check that the issue is not assigned to anyone. Mention a topics list of what you will be implementing in the notebook for that particular chapter. You can iteratively refine the list once you start working. Start a discussion on what can go in that particular notebook. "---" indicates algorithms yet to be implemented. Index of data structures Here is a table of the data structures yet to be implemented. |Fig|Page|Name (in book)|Code| | -------- |:--------:| :-----| :----- | |9.8|341|Append|---| |10.1|369|AIR-CARGO-TRANSPORT-PROBLEM|---| |10.2|370|SPARE-TIRE-PROBLEM|---| |10.3|371|BLOCKS-WORLD |---| |10.7|380|HAVE-CAKE-AND-EAT-CAKE-TOO-PROBLEM|---| |11.1|402|JOB-SHOP-SCHEDULING-PROBLEM|---| |11.4|407|REFINEMENT-HIGH-LEVEL-ACTIONS|---| |23.6|895|SENTENCE-TREE|---| |29.1|1062|POWERS-OF-2|---|