I have a virtual world with a grid filled with squares (x by y). There are entities that can do:
1. move 1 step in the four cardinal directions
2. eat food
3. fight another entity of a different type
4. mate with the same type of entity to reproduce (create one more of that type of entity)

The objective is to obtain the highest score possible. The score is calculated by:
+1 per food eaten
+1 per enemy killed
+1 per entity of that type

The inputs (neurons) are as follows:
1. position (x, y) on board
2. board size
3. types of entities in adjacent squares (including food, and null if empty)

I would like to create a program that will create hidden neurons that give rise to a sophisticated moving and attacking pattern that will allow it to obtain the highest score.

Which algorithm should I use?

  • 1
    Welcome to Computer Science! What have you tried? Where did you get stuck? We do not want to just hand you the solution; we want you to gain understanding. However, as it is we do not know what your underlying problem is, so we can not begin to help. See here for tips on asking questions about exercise problems. If you are uncertain how to improve your question, why not ask around in Computer Science Chat? – Raphael Mar 12 at 22:02
  • 2
    Note that programming is offtopic here. – Raphael Mar 12 at 22:02
  • I think it is a good but subjective question: no one really knows which idea will work best before you go ahead and implement it. – 6005 Aug 10 at 1:17

I would suggest that you try to apply reinforcement learning, maybe deep Q-learning or some other form of RL.

I don't know if those are going to be the best set of features (the best way to represent the input).

  • Thank you for the reply! How would you allow the program to create intermediate neurons? – RandomPieKevin Mar 12 at 22:00
  • @RandomPieKevin, I don't understand your question. You get to choose the neural network structure; you can make it whatever you want to be, and have as many or as few neurons as you want. You don't need a program to do that for you -- you can choose the neural network architecture yourself. – D.W. Mar 13 at 0:15
  • I thought that true AI would create their intermediate neurons themselves; thus, the true learning. – RandomPieKevin Mar 13 at 15:09
  • @RandomPieKevin, I don't know what you mean by "true AI" or "true learning", or where you got that idea from, but no, there's no reason why you need to be restricted to that, and that's not how machine learning is normally done. My answer certainly counts as learning and counts as AI; there's nothing fake or untrue about it. In any case, that restriction is not in the question, so if you have some additional requirements, I suggest you edit the question to clarify what your requirements are and what approaches you've already considered and rejected and why. – D.W. Mar 13 at 16:19

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.