Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 02 Dec 2004
Offline Last Active May 21 2016 08:30 AM

Posts I've Made

In Topic: how can neural network can be used in videogames

21 May 2016 - 08:17 AM

Unfortunately game situations are magnitudes more complex than the single problem of  telling one handily pictured husky from another  (which if ever needed as a 'tool' takes up a good sized NN by itself, and then we will need the 10000 other 'tools' (and their training sets) for all the other classification/differentiator/deobfuscator tasks, and then the processing resources to run them ALL in a timely manner.


Maybe if you were using NN to spot 20 year old game pixel patterns for game objects in a clutter of on-screen scenery this would be relevant. Unfortunately that IS still just a basic sensor filtering task and does little for the rest of the problem of playing the game.




"They can translate sentences between any two languages, with very little additional machinery."


I'd like to see the project that claims THAT.   Particularly with your use of the word 'any' -  when there are so many world  languages to map between and more than a few that dont have exact translations of certain words/idiom-contexts with other languages.   (English:"The spirit is willing but the flesh is weak" --> Russian:"The wine is good but the meat is rotten"...)


Text to text  NN input ???  or again you are claiming some subtool NN of a much more complex program and data set (dictionaries/grammar rule  translators) where the NN component actually turns out to be a trivial part of the whole thing.  ???




Temporal cause and effect  pattern spotting has major difficulties with noise from nonrelevant situational factors and a further combinatoric explosion of endcases, some coming now from irregular event timings.   Again in more complex simulation environments this forces greater human intervention being required in the training (hand training the logic which otherwise could simply further just be built as conventional logic) which is the most significant  chokepoint  of complex NN solutions.




For Go I could see use of convolutional neural networks to convert the simple Go grid into higher and higher level features and trying to spot the needed decision patterns .  How well can the future-assessment be evaluated - training the NN effectively for that generalizing, without it having terrible gaps?      But again that is for an example of a game with  'situation' that is utterly flattened out/narrowed in detail complexity, compared to just about all other 'games'.

In Topic: can c++ be used as a scripting language

19 May 2016 - 06:23 PM

Ive done this employing C's macro mechanism to simplify what 'Script'  has to be written (used for behavioral control of simple intelligent objects) .


It is also useful for  structured scripts  (like the start/end/else state constructs of Finite State machines)  ... not just individual function calls  (several of the AI Game Programming Wisdom books had several articles about  macros  doing that including, hierarchical finite state machines)


Advantage is that a routine/repetitive pattern of code (which sometimes are rather bulky) can be reduced to much simpler 'script form'   and an assumption of the script features being used in a systematic way (eliminating nesting/spaghetti code  hell).    The macro Script restricts what variables and calls can be accessed through the 'Script'


Another is that specialize code can be created/customized by just adding another 'macro' to your 'language'  (and if when needed you can still insert actual NATIVE code in (hopefully few) trouble spots to get done exactly what you want/need)


The C preprocessor then converts your simpler macro Script into native code now subject to the compilers optimizing abilities and can run directly without interpretor overhead (including eliminating subroutine calls)



Disadvantage : is some extra difficulty debugging where the 'script' produced code is mutated 




Some people may say 'why bother optimize' , but when you are running thousands of active/reactive objects of this level of complexity EVERY Turn,  the optimization can spell a great difference in the size of the players game environment





One thing that added a little difficulty was   : that my  'nice' grouping of  Script Code   created for each different object typewere (in my usage) run in different sections of the program, even though the 'Script' has their chunks defined  right next to each other (instead of breaking them up onto separate files, and the bother/confusion/disorganization that entails, and you seek to eliminate).


So its good  learning how to use   #define  #ifdef  etc...   to modalized the script text  so that by using multiple #include of the same file (each employing a different  #define  'mode' for a different place in the program)  




example  (a LOCKSTEP behavior processing for active/reactive object on a grid map which use finite state machines)


Situation detection  phase - all objects Scan and detect a number of stimulus to potentially react to (from their current local situation) and filter/prioritize them according to the objects mode  (with  potential interrupts for 'tactics' already in progress)


Solution Classification phase - all objects digest their 'stimulus'  set,  decided ONE best  action/tactic initiation (avoiding conflicting actions with other objects already busy interacting - which could change since previous phase)


Action Processing - carry out all decided actions (including animations) and generate results (resolve conflicts),  and adjust the game situation 




The above runs a simulation in a lockstep manner, so the separate phase  chunks of code for each object type (even though grouped together in the script file)   get placed in the corresponding 'phase' section of the program whose basic organization was 'the Big Switch'  (nested)    (My program used three phases, but the chunk split-up still happens if there are only two phases required by a lockstep simulation)

In Topic: Low level Resources regarding Convolutional Neural Networks

19 May 2016 - 05:19 PM

You can get the 'theory'  by simply searching for it online.


Basically it is a way to preprocess certain types of data (like largish pixel images) by repeatedly running 'small'  feature filter NN in parallel locally (with overlaps) across the whole image .  


Each local area of the regular grid (image) is processed to extract/integrate generic patterns/trends (like line/boundry detection or spotting a solid blob) from the basic data.   Further layer processing  then (in parallel) integrate that first order detecting larger patterns/trends (like spotting a 'corner').   Later layers then look for the super patterns which classify the picture.


The advantage is the lower 'detail' filter NNs are fairly small (some like 5x5 local groupings) and can be well formed to do their task.  They can be run in a massively parallel manner (you apply that layers same filter in an array scanning fashion ) and integrate/collapse each next layers input data til the final classification  (several layers itself) which detects combinations of the macro patterns.  


A 'divide and conquer' solution eliminating/minimizing ALOT of the  NxN  input weights (in the lower layers) such large data input arrays would require if done monolithicly.  



40+ years ago anatomical research was done that showed that the retina of eyes do operations like this (the low level feature detection). 

In Topic: how can neural network can be used in videogames

19 May 2016 - 04:31 PM

"You sound like someone that has never programmed either a checkers engine or a chess engine."


You sound like someone who hasn't programmed anything more complex than a "checkers engine or a chess engine".



"Yes, NNs are only a tool. I don't see who you are arguing with here"


Unfortunately they are the 'hammer' some people see all problems as 'nails' to use on.    NNs for basic classification of SIMPLE situational factors are fine, but once the situations are no longer simple (like spotting temporal  cause and effect)  they just dont work too well.   And even then (As stated above) there is the REST of the logic to be done to actually work a game problem solver.    Likewise, there usually is ALOT of complex data massaging that needs to be done FIRST to be able to feed it into an NN.    



"parts that can be implemented using neural networks"  


But are they 'parts'  which simpler hand crafted logic can do more simply and efficiently (Are they there done as NN just for the sake of doing them in NN ???)       




"not old enough to remember"    then read about it.  google   history of AI



Go's mechanism is very nice and simple - actually its point is it being boiled down into simplicity of mechanism.  The game situation representation and play process and  actions likewise are quite limited.   So of all games it may be nearly the best to use NNs on.   Too bad so many other games dont have its major advantages that allow NNs to be employed so easily.

In Topic: how can neural network can be used in videogames

19 May 2016 - 03:30 AM

I'm not that scared by your FUD about how complex things can get. :)


EDIT - a simple thing to contemplate what Im talking about is --- try to program Chess via a NN based solution.

I already mentioned I have used a NN as evaluation function in checkers. Using one as evaluation function in chess is not [much] harder: http://arxiv.org/abs/1509.01549

Other uses of NNs for chess are possible: http://erikbern.com/2014/11/29/deep-learning-for-chess/




Checkers as a equivalent to  Chess ?     ok .........


'Chess' Evaluation function  ( as in 'tool' ??) .... but is it the  fundamental core of the decision logic ?   Which is what Im talking about being a  problematic thing for  NN usage.


'possible'   -- Where AI is concerned I recall that little situation in the 50s where they thought AI was just around the corner, and all kinds of Computer AI goodness was just about solved.   Here we are 60 years later.   'Complexity' has proven to be quite perplexing.