AI Excitement: From Sleepless Nights to Gaming Innovation
Exploring the Boundless Potential of Artificial Intelligence in Gaming
The clock struck 2 AM, and the vibrant lines of ChatGPT's code illuminated my screen, beckoning me into a world of endless possibilities. Despite the call of sleep, I found myself captivated by the enchanting realm of coding magic. Fueled by ChatGPT's potential and a longing for exploration, my mind danced with ideas that had previously seemed out of reach.
In the era preceding ChatGPT, AI buzzed in the background, often feeling like sophisticated algorithms with limited direct impact on the general consumer. However, my recent months spent with ChatGPT have been nothing short of revelatory, challenging my perceptions of AI and its profound impact, particularly within the gaming industry.
What Generative AI Really is?
In this post, I aim to spotlight ChatGPT, affectionately referred to as "She" sometimes due to its uncanny resemblance to the AI in the movie "Her." While I've dabbled with various AI services like Bard, Gemini, Perplexity, etc., ChatGPT stands alone in its ability to empower non-coders like myself to create code from inception to completion. None have come close to achieving this feat, and I'm still making use of the free 3.5 version!
ChatGPT has served as the new user interface and conduit between my ideas, inputs, and various mediums. With her assistance (or should I say, doing 95% of the heavy lifting), I've delved into machine learning and automated data processing using my cloud database, all without a prior technical background. The thought of potential job titles like "GPT Coders" or "Copy and Paste Coders" in the future may not be far-fetched, and I hope I’d qualify for that job when it becomes reality.
While seasoned engineers might find this process trivial, for someone like me, it's a game-changer. Skipping the months typically required to learn coding languages like Java, HTML, CSS, SQL, and Python, I accomplished this feat in a mere three weeks. And the beauty of it? There's seemingly no limit to what you can achieve, even when required to expand into additional coding languages or platforms. However, building an operating system like Windows or MacOS might still be beyond my reach for now.
The Democratization of Innovation
Before ChatGPT, my work involved crafting complex systems akin to Bloomberg for games—analyzing trends, identifying promising genres, games, and companies, and operation plans to meet forecasted revenue targets. Collaboration with engineers was inevitable, involving extensive communication, documentation, and clarification.
Fast forward to today, and a single individual could potentially oversee the entire process, from conception to a functional prototype. ChatGPT's tireless assistance has allowed me to work 24/7 on any holiday across the globe and ask even the simplest questions without fear of judgment—a luxury I wouldn't have dared to indulge in before.
Demystifying AI: Building a Time Series Forecast with ChatGPT
Before delving further into AI's role and potential opportunities in gaming's future, I think it’d be helpful to share my recent experience using ChatGPT to build a time series forecast with machine learning models, and how I got there. I'll use Prophet as an example, as its simplicity makes it more digestible to a broader audience. Though not technically a machine learning model itself, Prophet shares many characteristics, it's undoubtedly one of the simplest, fastest, and most accurate univariate models for business forecasting I’ve seen. Taking into account trends, holidays, and seasonal patterns, it has garnered popularity with over 40 million downloads.
I'll illustrate using S&P 500 data as an example. However, it's crucial to remember that Prophet is designed for business data, not for predicting financial market trends with much more volatility. Financial decisions should not be made based on any examples in this article, Furthermore, no models can predict the market.
Leveraging my knowledge of Prophet, I skipped the research phase and instructed ChatGPT directly to build a time series forecast model using Prophet with tuneable parameters in Python. Below is the code it generated:
# Importing necessary libraries
import pandas as pd
from Prophet import Prophet
# Read the data
data = pd.read_csv('your_dataset.csv')
# Ensure the data has 'ds' and 'y' columns
data['ds'] = pd.to_datetime(data['ds'])
# Initialize Prophet model with tuning parameters
model = Prophet(
seasonality_mode='multiplicative', # Additive or multiplicative seasonality
changepoint_prior_scale=0.05, # Adjust the flexibility of the trend
holidays_prior_scale=10.0, # Adjust the flexibility of holiday impacts
interval_width=0.95, # Confidence interval width (default is 0.80)
)
# Add custom seasonality if applicable
# model.add_seasonality(name='custom_seasonality', period=30, fourier_order=10)
# Fit the model
model.fit(data)
# Define the future timeframe for prediction
future = model.make_future_dataframe(periods=30) # Adjust the periods as needed
# Make predictions
forecast = model.predict(future)
# Plot the forecast
fig = model.plot(forecast)
With each step, ChatGPT guided me through adding hundreds more lines of code and progressively finishing the model. This experience highlighted a shift in my information-seeking behavior.
You can do the same for Google’s TensorFlow using the LSTM network below:
import numpy as np
import pandas as pd
import tensorflow as tf
from sklearn.preprocessing import MinMaxScaler
from sklearn.metrics import mean_squared_error
import matplotlib.pyplot as plt
# Step 1: Load and preprocess the data
# Assuming you have a CSV file with a single time series column
data = pd.read_csv('your_dataset.csv')
dataset = data.iloc[:, 1].values.reshape(-1, 1) # Assuming the time series data is in the second column
scaler = MinMaxScaler(feature_range=(0, 1))
dataset_scaled = scaler.fit_transform(dataset)
# Step 2: Prepare the data for LSTM
def create_dataset(data, time_steps):
X, y = [], []
for i in range(len(data) - time_steps - 1):
X.append(data[i:(i + time_steps), 0])
y.append(data[i + time_steps, 0])
return np.array(X), np.array(y)
time_steps = 10 # Define the number of time steps to look back
X, y = create_dataset(dataset_scaled, time_steps)
X = np.reshape(X, (X.shape[0], X.shape[1], 1)) # Reshape input to [samples, time steps, features]
# Step 3: Split the dataset into training and testing sets
split_ratio = 0.8
split_index = int(split_ratio * len(X))
X_train, X_test = X[:split_index], X[split_index:]
y_train, y_test = y[:split_index], y[split_index:]
# Step 4: Build the LSTM model
model = tf.keras.Sequential([
tf.keras.layers.LSTM(units=50, return_sequences=True, input_shape=(X_train.shape[1], 1)),
tf.keras.layers.LSTM(units=50),
tf.keras.layers.Dense(units=1)
])
# Step 5: Compile the model
model.compile(optimizer='adam', loss='mean_squared_error')
# Step 6: Train the model
history = model.fit(X_train, y_train, epochs=100, batch_size=32, validation_data=(X_test, y_test), verbose=1)
# Step 7: Plot training and validation loss
plt.plot(history.history['loss'], label='Training Loss')
plt.plot(history.history['val_loss'], label='Validation Loss')
plt.title('Training and Validation Loss')
plt.xlabel('Epochs')
plt.ylabel('Loss')
plt.legend()
plt.show()
# Step 8: Make predictions
predictions = model.predict(X_test)
predictions = scaler.inverse_transform(predictions)
# Step 9: Evaluate the model
rmse = np.sqrt(mean_squared_error(scaler.inverse_transform(y_test.reshape(-1, 1)), predictions))
print('Root Mean Squared Error:', rmse)
Here are the finished products by ChatGPT using Prophet:
Default setting to forecast for the next 730 days:
Using training from 1990-01-01 to 2022-01-03 even Prophet is not required to specify a training data range
Change points are set as “auto” by default.
The latest change point is 2015-08-07 by default
If you are not familiar with what change points are, here is an example of human intervention to label trend change events.
Trend, Daily, and Yearly Seasonalities (No holiday effects since the market is not open during holidays.
Cross Validation
[14852 rows x 6 columns]
S&P 500 (730 Days) Performance Metrics: (Long-Term - Model 1)
horizon mse rmse mae mape mdape smape \
0 37 days 25956.279982 161.109528 111.037070 0.079309 0.050544 0.078728
1 38 days 26417.412690 162.534343 112.171140 0.080086 0.050961 0.079570
2 39 days 26675.045497 163.324969 112.688730 0.080451 0.051372 0.079972
3 40 days 26724.754081 163.477075 112.852046 0.080366 0.051916 0.079988
4 41 days 26479.359849 162.724798 112.490873 0.080126 0.052123 0.079811
Given that Prophet is tailored for business data and considering the volatility of the financial market in recent years, I believe Prophet performed admirably, even when used with its default settings and without adjustments for events like COVID-19. Personally, I doubt I could generate predictions anywhere near as close if asked to forecast the S&P 500 closing price two years ahead on January 3, 2022, despite having access to more comprehensive information than Prophet utilized.
After having the model running, I was curious to learn how each parameter would change the model’s forecasting behavior. So I asked ChatGPT to write me a script to generate a list of tunable parameters with all possible combinations based on the default values within the defined range.
She wrote something fancy with loops to start, but I couldn’t understand it fully.
So I asked her to rewrite it without using loops, it only took 5 seconds.
With just a few iterations, the script was finished. There are a lot more combinations than I initially anticipated.
From Google Search to Conversational AI
So, what has changed? Previously, relying on Google Search meant navigating countless links, evaluating their relevance, and often encountering outdated or irrelevant information. Similarly, YouTube’s how-to videos, while helpful, could be time-consuming to extract precise information for hour-long tutorials and require a certain level of coding expertise to fully follow the instructions.
The ChatGPT Advantage: Efficiency and Learning
The approach with ChatGPT is fundamentally different. She cuts through all of the UI from Google links to web pages, registrations, and many of the least enjoyable steps.
Initial Research: Similar to the old method, research begins on Google or ChatGPT to define the task and preferred approach.
Conversational Guidance: This is where the experience diverges. I directly engage with ChatGPT, instructing it to execute the task in my preferred way - even if initially flawed. ChatGPT will still complete the request while gently guiding me toward the correct approach. Some might argue this is a bug, but I perceive it as a learning opportunity. After all, skilled users who leverage ChatGPT for speed wouldn't follow these "wrong paths" anyway.
Code Integration and Learning: ChatGPT facilitates the integration of code blocks from various sources, including documentation examples. By providing enough examples, ChatGPT can "learn" and achieve the desired outcome within seconds. This ability to learn and adapt is truly remarkable. This blog post only scratches the surface of my experience with ChatGPT.
The Future of Gaming: Reimagined User Interfaces and AI-Powered Experiences
By now, you've likely grasped ChatGPT's essence: it's a transformative user interface that reshapes how we interact with information and existing products. It acts as a bridge, connecting users with specific information, organizing it as desired, and translating field-specific knowledge/languages and natural languages.
Throughout the tech and gaming histories, both industries have seen significant advancements with each evolution in user interfaces and new user controls to interact with information. From joystick controllers, FAMICOM controllers, modern console controllers, mice and keyboards, blackberry keyboards, NDs, Wii, Switch, the iPhone UI and control, and the like, these innovations continuously reshape our interactions with technology.
While not all existing games might seamlessly translatable to a ChatGPT-style interface and controls, it's only a matter of time before developers figure out something interesting. Imagine how games like The Sims could be completely transformed in the future, offering an entirely new way to experience and shape virtual worlds. How about games like Minecraft and Roblox? Forget about those special commands, what if a 4-year-old girl uses her voice to tell the game to build her Elsa’s castle licensed from Disney? Do you like some TNT too? For just a few sentences, kids don’t even need to know how to Google the corresponding commands to do certain things, just naturally say it or type it. The learning curve for a game like Minecraft and Roblox will be reduced dramatically for newbies. No switching between apps and browsers, parents no need to worry about online safety, etc. These are just a few examples.
AI's Broader Impact
Artificial intelligence spans a vast spectrum, including machine learning and deep learning, which power most generative AI tools like ChatGPT today. Another intriguing area with potential for AI application is app discovery, though specific use cases for smaller companies remain unclear.
While production tools like Sora hold promise, video creation may require more time to reach ChatGPT-level success. Generative AI excels at delivering from scratch to a minimal variable product (60%), I called it the 60% temptation, but going from 60% to 90% often demands significantly more effort.
While text editing is swift, video rendering, even with powerful stations, incurs longer response times. This delay often stems from iteration cycles, which could significantly slow down the process. Imagine trying to develop a new feature for a robot on Mars. Each iteration could require waiting 5 -20 minutes for the signal to travel between Earth and Mars, adding significant delays to the iteration process. While I'm not a technical expert, the prospect of rendering an HD video in 5 seconds under the existing video technical setup is beyond my imagination, but that’s how we usually get surprised.
App Discovery
Speaking of App Discovery, I'm pleased to provide the latest Q4 2023 results for all ad networks, as people have inquired. Notably, AppLovin has emerged to be a big winner in recent years, as Mitch and Blake mentioned in their GameCraft pod recently, AppLovin is a favorite of theirs and it’s still under the radar for many people.
Having collaborated with AppLovin across various teams, the experience has been a testament to their success. On one occasion, we worked together on an intensive two-month project, even spanning weekends, revealing their keen sense of opportunity, transparency, and professionalism. Additionally, it's intriguing that, throughout our years of interaction, I still don’t know any of their secretaries from group leaders to the C-suites. This stands in contrast to even smaller companies, where engagement with administrative and business teams for scheduling is a common step in setting up meetings, even at non-executive levels. This speaks volumes about the streamlined efficiency of their operations and the dedication of their core team. I highly recommend trying out their service if you're seeking a reliable long-term partner to scale your business.
Personally, I've found that using Calendly is a much more effective way to manage my schedule than relying on an assistant. For instance, you can categorize your calendar slots into different priority groups and share the appropriate group accordingly.
AppLovin, Snap & Unity
Meta, Alphabet, AppLovin, Snap & Unity