Posts

Showing posts from April, 2025

Will AI ever rival our brains?

Image
 I have been reading a good picture book, 'How the brain works', published by Dorling Kindersley. I realised it will be a long time before Artificial Intelligence (AI) replicates our amazing brains with just numbers. Our brains have evolved over millions of years and are specifically adapted for humans. Science does not fully understand how our brains work. Our feeling of consciousness is partly an illusion. I suppose AI will be a different kind of intelligence to ours. I found this picture book in my local library.

Adding short names for built-in functions

Image
 I add short names for frequently used built-in functions, when 'minifying' my game. I use 'sed' to append code like this to the start of my game:     Array.prototype.p=Array.prototype.push     Math.f=Math.floor     document.ce=document.createElement     Node.prototype.ac = Node.prototype.appendChild     var w=window;w.st=w.setTimeout; I then change the code like this:     sed -e 's/\.push(/.p(/g'  But, I have not found a way of shortening the property 'Node.nextSibling'. Modifying the DOM may not work in old versions of Internet Explorer. I get annonyed when I see repeated code when I look through my game's code after I have 'minified' it