Perkun

  • 23 Replies
  • 7634 Views
*

pawel.biernacki

  • Roomba
  • *
  • 17
Perkun
« on: February 23, 2018, 02:13:36 pm »
Hi!

I have invented a new AI algorithm and implemented an experimental language Perkun based on it - https://sourceforge.net/projects/perkun/ . Perkun is also a library usable in your own projects (C++) - here is a small demo how to use it: https://sourceforge.net/projects/perkunwars/ . I also write a blog about Perkun - http://pawel-biernacki.blogspot.fi/ .

I would like to talk about it. The idea is to introduce so called hidden variables (the variables that affect the state of the world, but are invisible). It has been attempted to achieve AI with the constructs like IF THEN, but IF THEN is stateless and does not remember anything. On the contrary in Perkun there is a belief - a state (a probability distribution) that denotes what the player believes in. This belief is continuously adjusted to the observations.

My algorithm is capable of "asking questions" i.e. sometimes it can perform actions that are not beneficial for the player, but give him the knowledge. This is the most promising feature of my algorithm.

Pawel Biernacki

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1307
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Perkun
« Reply #1 on: February 23, 2018, 08:42:48 pm »
So, is this an interpreted language you invented, Pawel?

Vampires are an interesing idea for a game...   Did you know vampires are ancient ?

"One of the earliest accounts of vampires is found in an ancient Sumerian and Babylonian myth dating to 4,000 B.C."

Citation: http://tcat.tc/1xYxZbI
My Very Enormous Monster Just Stopped Using Nine

*

pawel.biernacki

  • Roomba
  • *
  • 17
Re: Perkun
« Reply #2 on: February 23, 2018, 09:27:47 pm »
Yes, it is an interpreted language.

I did not know the vampires were ancient. But I like them. I own even a small software company called Vampisoft  :) www.vampisoft.com

Concerning the perkun_wars - there are three NPCs in the game and each of them is controlled by the Perkun interpreter. Each of them has two input variables (where_am_I and do_I_see_vampire). There is also a hidden variable - where_is_vampire. Obviously when you see him you know he is in the same place where you are, but if you don't see him - you can only believe where he is.

If you unpack perkun_wars-0.0.2.tar.gz you can run for example:

perkun perkun_wars-0.0.2/perkun/final_code/dorban_general.perkun

Then you enter the session mode of Perkun:

loop with depth 3
I expect the values of the variables: where_is_Dorban do_I_see_vampire
perkun>


Then you can enter for example "place_Wyzima false" and press Enter. The response will be:

belief:
where_is_vampire=place_Wyzima where_is_Dorban=place_Wyzima do_I_see_vampire=false 0.00000
where_is_vampire=place_Shadizar where_is_Dorban=place_Wyzima do_I_see_vampire=false 0.500000
where_is_vampire=place_Novigrad where_is_Dorban=place_Wyzima do_I_see_vampire=false 0.500000
optimal action:
action=goto_Shadizar


Which means that the player believes the vampire must be in Shadizar or in Novigrad (since he is not in Wyzima) and decides to go to Shadizar. This is the whole point of Perkun - the belief is adjusted to the input variable values.

But if you do not like the command line - you can build the Perkun Wars (which is running Perkun in background).

Pawel Biernacki

*

ranch vermin

  • Not much time left.
  • Terminator
  • *********
  • 947
  • Its nearly time!
Re: Perkun
« Reply #3 on: February 24, 2018, 03:19:50 am »
Remember the Watson computer that answered Jeopardy questions..   it didnt store anything in a "tight retrieval" with trees and things,  it literally just looked through the raw text as it was, and it worked for 1 word answers.

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • *******************
  • Prometheus
  • *
  • 4659
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: Perkun
« Reply #4 on: February 24, 2018, 07:36:07 am »
Quote
On the contrary in Perkun there is a belief - a state (a probability distribution) that denotes what the player believes in. This belief is continuously adjusted to the observations.

My algorithm is capable of "asking questions" i.e. sometimes it can perform actions that are not beneficial for the player, but give him the knowledge. This is the most promising feature of my algorithm.

. . . . Why does this oftly sound like my plans? ..........Are you creating a NLP "talking" AGI !? I read on your site "Programming Language", but you also talk about "Language-like" capabilities as if it's alive and thinking and learning and talking to us. Also are you using a RNN/LSTM ?...
Emergent          https://openai.com/blog/

*

pawel.biernacki

  • Roomba
  • *
  • 17
Re: Perkun
« Reply #5 on: February 24, 2018, 08:50:18 am »
No, it is not a Natural Language Processing stuff. The heart of the language is an optimization algorithm. It is somewhat similar to the minimax, but in my algorithm:

1. there is only one player
2. the environment is stochastic
3. the player may not see everything

In minimax there are two opponents and there are no "beliefs".

I do not use any Neural Networks - the algorithm just searches through a game tree it creates.

Here are some YT materials about it:



Pawel Biernacki
« Last Edit: February 24, 2018, 09:16:59 am by pawel.biernacki »

*

keghn

  • Trusty Member
  • *********
  • Terminator
  • *
  • 824
Re: Perkun
« Reply #6 on: February 24, 2018, 01:44:23 pm »
 This is not AGI.

*

pawel.biernacki

  • Roomba
  • *
  • 17
Re: Perkun
« Reply #7 on: February 24, 2018, 02:10:12 pm »
This is not AGI.

keghn - would you please elaborate it a bit?

I think the algorithm as it is has some difficulties, since the models are huge. I have prepared a Prolog-based method to create the models. But the difficulty is of quantitative nature.


*

AgentSmith

  • Bumblebee
  • **
  • 37
Re: Perkun
« Reply #8 on: February 24, 2018, 02:29:43 pm »
So, similar to Minimax the leafs of your search tree have specific payoffs that are propagated back to higher layers, right?
How is your search tree created?
Why are you choosing a tree for your model? If you would allow for cycles w.r.t to your transitions the model representation can be much more compact.

*

pawel.biernacki

  • Roomba
  • *
  • 17
Re: Perkun
« Reply #9 on: February 24, 2018, 02:55:37 pm »
So, similar to Minimax the leafs of your search tree have specific payoffs that are propagated back to higher layers, right?
How is your search tree created?
Why are you choosing a tree for your model? If you would allow for cycles w.r.t to your transitions the model representation can be much more compact.

Right. I must say it is not only the payoff that is propagated but also the belief.

The search tree is created as follows (see perkun-0.1.7/src/optimizer.cc):

- get_optimal_action(belief b, int n)
this is searching all the actions and returns the argmax (just as in minimax) of the function get_payoff_expected_value_for_consequences

- get_payoff_expected_value_for_consequences(belief b1, int n, action a)
this is iterating over all visible states (observations), calculates the visible state probability given current belief and the selected action and if >0 it propagates one level higher - it is important that it calculates the next belief using populate_belief_for_consequence. So Perkun thinks "I believe in b0, let us assume I will do action a and observe the outcome i as a result, what will I believe then?".
The above function returns the expected value of the payoff.

- get_consequence_probability(belief b1, action a, visible_state vs)
This function is used to calculate the prior probability of the visible state given the current belief (which contains the current visible state) and action.

- populate_belief_for_consequence(belief b1, action a, visible_state vs, belief & target)
 This function calculates the interpretation (the new belief), how Perkun interprets the observation vs once it believes in b1 and performs action a.

These four functions form the core of the algorithm. The most important thing is propagating the belief throughout the game tree.

Now the question why I choose a tree - it was just natural for me. I do not quite understand how to apply cycles. I wanted an algorithm that would work with uncertain information in a stochastic environment.
« Last Edit: February 24, 2018, 04:48:29 pm by pawel.biernacki »

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • *******************
  • Prometheus
  • *
  • 4659
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: Perkun
« Reply #10 on: February 24, 2018, 07:44:34 pm »
I am lost lol...........

Ok, let's try this question.

C++ is a Programming Language. The programmer can code whatever they want, whether it be an AGI or a clock or a 3D physics simulation. What does Perkun do for me that C++ can't? Does it predict what I will code next? How would it know that lol unless it was all-knowing? Does it show expected C++ commands? Other than that I don't see what it could do because, a programmer writes code that he knows he wants to write.........
Emergent          https://openai.com/blog/

*

keghn

  • Trusty Member
  • *********
  • Terminator
  • *
  • 824
Re: Perkun
« Reply #11 on: February 24, 2018, 08:18:30 pm »

This is narrow AI. AGI is a bunch of Narrow AI working together, that has only self learning algorithms with in.

AGI learn every thing form the ground up. In A FPV format.

So if you sting a bunch of chat bot together you have to remove all of the text code for generating language.
So if you sting in a above narrow AI game you have to remove the advanced out of body of viewing the world form above.

 It is possible that this advanced coding could be removed slowly as the a narrow AI transforms into a AGI.
 But i have not seen that anywhere except, the closest is, in nature when a caterpillar become a butterfly.

 Other wise it is good fun and programming you doing @Perkun:)

*

pawel.biernacki

  • Roomba
  • *
  • 17
Re: Perkun
« Reply #12 on: February 24, 2018, 08:49:43 pm »
I am lost lol...........

Ok, let's try this question.

C++ is a Programming Language. The programmer can code whatever they want, whether it be an AGI or a clock or a 3D physics simulation. What does Perkun do for me that C++ can't? Does it predict what I will code next? How would it know that lol unless it was all-knowing? Does it show expected C++ commands? Other than that I don't see what it could do because, a programmer writes code that he knows he wants to write.........

In principle C++ can do everything that Perkun does, but it does not contain my algorithm. So what I recommend here is my algorithm rather than some new syntax in a new language. This is an optimization algorithm, which attempts to maximize the expected value of a payoff function during next n steps. So what Perkun expects is:

- a bunch of variables (including hidden ones) defining our agent within its world
- information what is good and what is not good - i.e. a payoff function
- information how the world works - i.e. a model

Given the information listed above you can use Perkun to make optimal decisions. Perkun is not a predictor in general, it is an optimizer.

« Last Edit: February 24, 2018, 09:11:52 pm by pawel.biernacki »

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1307
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Perkun
« Reply #13 on: February 24, 2018, 10:25:00 pm »


Title: The Riddle of the Hideout

Publisher Software: PHP

Cite Source: http://aihax.com/shortstory/
____________________________________________________________________________________________________

Do you think your algorithm may be useful to optimize writing short stories?
My Very Enormous Monster Just Stopped Using Nine

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • *******************
  • Prometheus
  • *
  • 4659
  • First it wiggles, then it is rewarded.
    • Main Project Thread
Re: Perkun
« Reply #14 on: February 24, 2018, 11:25:37 pm »
"use Perkun PL to make optimal decisions"
i.e.
Perkun helps you figure out how to code something U don't know how to code.

Ya but...If I'm coding something I want to code...only I (me, an AGI) know what must be coded and what comes next after that to code and how the whole program works...Perkun *cannot* give me optimal suggestions like "oh time to use a For Loop!" or "Oh time to code in x = (7>3)*3>1 in line 45 or the next line!", or "Oh time to delete lines 6-98 cus it doesn't work after all!", because Perkun isn't thinking, it isn't an AGI to do so, it doesn't know what must be put in code to create said application...only I know and can reason what to code to make my program...

However if you mean, it makes the code more efficient but remains the same "code" / "application"....then that's another story. That would help our civilization. Who knows how small one's program could be if coded professionally.
Emergent          https://openai.com/blog/

 


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

333 Guests, 0 Users

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

Articles