Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 189159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:08:57+00:00 2026-05-11T16:08:57+00:00

I am working on a turn-based-game AI using a neural-network technique known as NEAT

  • 0

I am working on a turn-based-game AI using a neural-network technique known as NEAT. I am attempting to train a network that can move around a two dimensional (X&Y coords) space given a variety of values that are stored in what is effectively a two dimensional array.

I can see two strategies for using the neural network:

  1. For each “cell” in the grid, provide the scores from the different heuristics as inputs to neurons and create a NN that is effectively a very complicated “scoring” system. Move the Non Playing Character (NPC) to the location with the highest score.

  2. Create a compressed value for each heiuristic measure (somehow compressed into as few bits as possible) and provide an input neuron for each of these measures.

I am quite interested in option two because it presents the least amount of calculations required (the runtime of the game is quite long), however I am confused as to what approach I could use to create the “small representation” version of the two-dimensional heiuristic values. I know there are techniques such as Fourier Transformations out there, however I don’t know if these will suit my problem. Basically I am looking for a way to convert a 50×50 array of doubles into one or maybe two double values. These two double values can be lossy-compressed, I don’t need to be able to get the original values back, I just need a reasonable mechanism for changing the input data into a small footprint.

An alternative to these two possibilities is to somehow encode a “region” based on some distance from the NPC (so you get the actual values for a “close” cell, and an approximation for a “far” cell). I don’t know exactly how I would wire this up, but it at least gets rid of the need to evaluate every cell every turn of the game (given I am looking at about 5 million rounds at approximately 1 second per round, any simplification I can come up with would greatly help).

I apologise if this isn’t making much sense, it is quite a difficult problem that has stumped me for a while, and I can’t think of an easy way to describe it.

Thankyou,

Aidan

EDITED TO ADD (and change title):

Thanks to Chris we’ve refined what I am looking for. What I am looking for is a way to approximate a line (I can convert the 2D map into a line) in as few parameters as possible. I have used cubic splines for interpolation before, however I need something a lot more feasable for a data-set that varies between 0.0 and 1.0 quite aggressively. What I am realling looking for I suppose is a “hash” of the map.

I know there are techniques such as cubic splines that I can work out some “key-points” from, and these values are a reasonable analogy for what I am looking for. I need a way to take the 2500 values and come up with a small representation of these values that I can use for the neural network. I think the NN can be trained to infer the true meaning of these representations, or at least to determine some correlation between the representation and the real world, so it doesn’t necessarily need to be a reversible function, but I don’t think many one way functions (such as MD5’s, SHA’s) are actually going to be very helpful either…

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T16:08:57+00:00Added an answer on May 11, 2026 at 4:08 pm

    Basically, any graphics compression algorithm is going to do what you want. They’re heavily optimized for compressing 2D arrays of numbers into the smallest possible footprint.

    Edited to add:

    The other thing to consider, since you’re looking to use compression to reduce processing time, is that getting really high compression ratios generally involves more calculation to compress and decompress the array. You may reach a point where you’re spending more time compressing and decompressing the array than running the neural network.

    Edited again to add:

    Based on your comments, it sounds like what you may want is a space-filling curve. Use the curve to turn your 50×50* array into a 1×2500 line and then come up with a formula that approximates the values you want for each cell of the array.

    *Does the array have to be 50×50? It may be much easier to fill with a space filling curve if it’s a square of slightly different dimensions. The Hilbert curve works nicely for dimensions that are powers of two, for instance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a medium scale project (a turn-based game) that's currently written in C/C++.
I'm pretty exasperated. I'm attempting to build a turn-based multiplayer online game for Android
I'm working on a turn based board game for iPhone and eventually Android. I'm
I am working on a web application (ASP.NET) game that would consist of a
I have a game I am working on that has homing missiles in it.
I'm currently working on a little text-based game after watching the new Tron movie
I am working on a piece of arduino code that is using the BlackWidow
I'm working a piece of code to turn phone numbers into links for mobile
Working with a SqlCommand in C# I've created a query that contains a IN
Working on a project that parses a log of events, and then updates a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.