Reinforcement learning is a framework that allows AI systems to learn from experience and make decisions in dynamic environments.  

One way to explore its potential is by training an AI agent to play a video game in real time. This controlled environment demonstrates principles that apply to everyday business challenges. This blog post describes how I did this as part of a project as an intern at SAS.

Training the AI agent 

The goal was to create an AI that could watch the game screen, understand what was happening and decide what to do in milliseconds. To get there, we needed to give the AI a lot of “practice.” This project was part research experiment, part engineering challenge and part childhood dream.

Using SAS tools such as the reinforcement learning action set and SAS® Event Stream Processing, along with Python, it was possible to set up an environment where the AI could run thousands of simulations. Each simulation helped the AI learn from every win, loss and mistake. Over time, it began to make smarter choices, react faster and even develop its own strategies.

Working in real time 

A key challenge was latency. Once the AI was trained, the next step was making it work in the live game. This meant turning its learned patterns into split-second actions, so it could run, jump and collect points just like a human player.

The final system could respond in under five milliseconds, a speed that made it competitive in real time.

AI learns to play video games step by step: the system processes the game screen, calculates rewards, and teaches the agent to take actions like jump or move left/right until it improves at the game.

Adaptive AI for business 

Reinforcement learning models are adaptive, not just predictive. Traditional analytics rely on historical data to make forecasts, but reinforcement learning allows systems to adjust continuously based on real-time feedback. In business, this can be a major advantage.

AI as a creative tool 

While the project involved plenty of coding and problem-solving, it was also a creative process. It showed me that AI isn’t just for business dashboards or forecasts. It can be interactive, engaging and fun. Beyond the technical challenges, it was a chance to experiment, test new ideas and see how a concept could evolve into a functioning system.

More importantly, it demonstrated how SAS technology, working hand in hand with open source, can bring innovative ideas to life, from concept to working product.

Learn about more ways that SAS is using agentic AI to create solutions

Share

About Author

Abel Saj

Data Science Intern

I'm Abel Saj, a junior studying Computer Science and Statistics at UNC Chapel Hill. I'm involved in building Reinforcement Learning agents through the Herd at Work project at SAS

Leave A Reply

Back to Top