PRO|STAMINA

  • 3 Replies
  • 2575 Views
*

Zero

  • Eve
  • ***********
  • 1287
PRO|STAMINA
« on: January 05, 2018, 09:45:09 am »
 
Hi,

I've just realized that I forgot to drop a link to a pet programming game I made several months ago 

It's called PRO|STAMINA. It's a tennis themed betting game where two programs compete in duels.

The program that makes the best predictions of the other program's behavior wins the game. So... who has the deepest learning algorithm?

Tell me what you think. http://pro-stamina.atspace.eu/

*

Zero

  • Eve
  • ***********
  • 1287
Re: PRO|STAMINA
« Reply #1 on: January 05, 2018, 10:01:26 am »
Here are 3 bots to start with.

Kickass.js
Code
var previous = [0,'Love',0,0,'Love',0];

var opGameplay = {};

var myComment = 'Go!';


onmessage = function(e) {

   
    var workerResult;
 
    if (e.data=='play') { workerResult = 2; } else {

        learn(e);
       
        previous = [
            e.data.me.force,
            e.data.me.point,
            e.data.me.game,
            e.data.opponent.force,
            e.data.opponent.point,
            e.data.opponent.game
        ];
       
        myComment = ' ';
       
        var opGuess = guess();
       
        if (opGuess > 5) {
           
            workerResult = 1;
           
        } else {
           
            workerResult = opGuess+1;
           
        }       
    }
   
    postMessage(workerResult+myComment);
}



function learn(e) {
   
    for (var i=0; i<6; i++) {
   
        var situation = e.data.opponent.force+'<='+i+'=='+previous[i];
       
        if (!opGameplay[situation]) {
           
            opGameplay[situation] = 1;
           
        } else {
           
            opGameplay[situation] += 1;
           
        }
    }
}



function guess() {
   
    var best = 0;
    var bestValue = 0;
    var value;

    for (var testForce=1; testForce<10; testForce++) {
       
        value = 0;
   
        for (var i=0; i<6; i++) {
           
            var situation = testForce+'<='+i+'=='+previous[i];
           
            if (opGameplay[situation]) { value += opGameplay[situation]; }
           
        }
       
        myComment += '['+testForce+']='+value+', ';
       
        if (value >= bestValue) {
           
            bestValue = value;
           
            best = testForce;
           
        }
    }   
   
    return best;
}

Smartass.js
Code
onmessage = function(e) {

  var myComment = '';

  var workerResult;
 
  if (e.data=='play') { workerResult = "1"; } else {
     
      workerResult = e.data.opponent.force+1;
 
      if (e.data.me.force > e.data.opponent.force) { myComment = "Wooo yeah!"; } else { myComment = "ok..."; }
  }
 
  postMessage(workerResult+' '+myComment);
}

Randy
Code
onmessage = function(e) {

  var workerResult = 1+(Math.random()*3);
  postMessage(workerResult+' '+Math.floor(10000000*Math.random()));
}

*

ivan.moony

  • Trusty Member
  • ************
  • Bishop
  • *
  • 1729
    • mind-child
Re: PRO|STAMINA
« Reply #2 on: January 05, 2018, 12:03:21 pm »
I like the graphic design.

*

Zero

  • Eve
  • ***********
  • 1287
Re: PRO|STAMINA
« Reply #3 on: January 05, 2018, 02:27:27 pm »
Thanks! I tried something futuristic... green from The Matrix, blue from Tron, and red from Roland Garros.  ;)

So... can you beat Kickass.js gentlemen?

 


Will LLMs ever learn what is ... is?
by HS (Future of AI)
November 10, 2024, 06:28:10 pm
Who's the AI?
by frankinstien (Future of AI)
November 04, 2024, 05:45:05 am
Project Acuitas
by WriterOfMinds (General Project Discussion)
October 27, 2024, 09:17:10 pm
Ai improving AI
by infurl (AI Programming)
October 19, 2024, 03:43:29 am
Atronach's Eye
by WriterOfMinds (Home Made Robots)
October 13, 2024, 09:52:42 pm
Running local AI models
by spydaz (AI Programming)
October 07, 2024, 09:00:53 am
Hi IM BAA---AAACK!!
by MagnusWootton (Home Made Robots)
September 16, 2024, 09:49:10 pm
Attempting Hydraulics
by MagnusWootton (Home Made Robots)
August 19, 2024, 04:03:23 am
LLaMA2 Meta's chatbot released
by spydaz (AI News )
August 24, 2024, 02:58:36 pm
ollama and llama3
by spydaz (AI News )
August 24, 2024, 02:55:13 pm
AI controlled F-16, for real!
by frankinstien (AI News )
June 15, 2024, 05:40:28 am
Open AI GPT-4o - audio, vision, text combined reasoning
by MikeB (AI News )
May 14, 2024, 05:46:48 am
OpenAI Speech-to-Speech Reasoning Demo
by MikeB (AI News )
March 31, 2024, 01:00:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am

Users Online

390 Guests, 0 Users

Most Online Today: 571. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles