forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AI program

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
jalih



Joined: 30 Jul 2012
Posts: 196

PostPosted: Mon Jul 07, 2014 10:04 am    Post subject: AI program Reply with quote

I wrote a simple program in PL/I to compete at the AI contest:

Rules of the game:

Game has two players and 1000 rounds. Each round both players choose a whole number between 0-9. Both players score points the amount of the smaller number, also player that chose the smaller number gets three extra points. If the answers are the same, both players score one extra point.

My program:

I chose to use Hopfield neural network as autoassociative memory. I record the three last opponent's moves and train the network with that history as bit-vector. To get the most likely opponent's next answer, just feed all the possibilities into the network and choose the one with least bit-errors on recall.

My PL/I program with source and binary is available here. It takes the number of rounds as first input and after that numbers 0-9 as input. It outputs the opponent's most likely next move and the number it chooses based on that (first three AI answers are always 0).

How would you write the code in Fortran?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group