Wednesday, December 23, 2009

// // Leave a Comment

Сватбата - експериментална комедия (The Wedding, a short film)


Сватбата - експериментална комедия (The Wedding) from Todor Arnaudov on Vimeo.



Във Вимео е най-добро качество, но ако не работи: http://vbox7.com/play:b89de846
Или: http://twenkid.com/film/svatbata/svatbata_480x360.avi

Български - виж по-долу.

"The Wedding" - my first complex movie. (The film is in Bulgarian, not yet subtitles)
Genre: experimental surrealistic comedy.
Synopsis: a young reporter is visiting a mass wedding of the Sect of FMI to make a report, however he makes the terrifying discovery that he's also supposed to be married, without knowing who. The nightmare goes worst, when he finds out that everybody seems to be making fun of him. However, how it is going to end?
...
Синопсис

Млад репортер отива да заснеме масова сватба в Сектата на ФМИ в Пловдив, където прави ужасяващото откритие, че той също е заплануван за Сватбата и не се знае за коя ще го оженят. Това е само началото на неговия кошмар, защото изглежда, че всички се подиграват с него... Как обаче ще завърши всичко?

Повече инфо в блога на Twenkid Studio
Read More

Wednesday, December 16, 2009

// // Leave a Comment

Reinforcement learning - comments on a Ben Goertzel's blog article

About: "Reinforcement Learning: Some Limitations of the Paradigm"


Bulgarian readers could also check out my article: Анализ на смисъла на изречение въз основа на базата знания на действаща мислеща машина. Мисли за смисъла и изкуствената мисъл.

...

You're right that if the system can alter or "re-wire" its circuitry that computes "reward", this confuses the mechanism, but I believe humans actually can do that - person's values are changing during life time, and even during the decision processes themselves.

I think "reward" is looked in a too narrow sense, because mind is not as solid and... single-minded to have one-single type of rewards. You've spoken about the "sub-selves" in the blog, I would say "virtual control units" that take control over the body.

Body is what makes mind to look uniform, even if it's not, mind can want 1000 things, body can't do them in the same time.

I've speculated on that in my old article, but it's in Bulgarian, I have to translate it in English (eventyally citing it).

E.g. let's consider a boy which is hesitating whether to eat up a chocolate or not. This could be an immediate high taste reward in a near future and if the boy plans only for 1 minute ahead, this is a right decision.

However, what if the boy widen the period of prediction to one year? He remembers his pain while visiting his dentists and reminds his notes, that eating too much chocolate causes bad teeth and pain. So if he plans for one year and reminds this, and decides that this will happen (it couldn't be sure), then the highly rewarding decision would stop being rewarding in the equation and the boy wouldn't take it.

Overall, the maximum reward depends on the set of predicting sub-units, scenarios, values taken into account in the very moment of decision, and the period of time they are predicting ahead.

They are changing, depending on attention, context, mood or even chance - there are so many scenarios that the brain can think of.

The set of predicting sub-units may change, they can switch at different levels of hierarchies and predicted periods, while the behaviour could still keep being reward-driven. It could be reward-driven for the particular "reward-driven virtual unit that took control over the body in this very moment".

This implies the mind is not uniform and there is not single "greatest reward".

...

And another comment on another comment:

I mean, e.g. if you're 18, you may think that making random sex right now is "cool". When you are 28, you may think it's not, even though making sex still would bring you immediate pleasere - however, higher level controls would inhibit your urge for lower level rewards and generally shift your behaviour to higher level rewards.

My point is that reward is not only dopamine, endorphin or so. Higher the ingelligence, higher the abstraction of reward could be. A reward is what the one that receives it considers "a reward", and even the altruism could also be taken as egoism, because one is doing what is "good" regarding its own values and desires, sometimes it's against what the other wants.

E.g. when a lover dies to save his beloved one. Is it really an altruism? How she will feel when seeing him dying, wouldn't she prefer them to die together?

And if you're doing something "against yourself" isn't it to prevent something that you consider worst. When you feel moral responsibility of doing something, fear of not fulfilling your duty might be bigger than the fear of pain.

...

На български - учене с подкрепление, машинно обучение, изкуствен интелект, силно направление, Бен Гьорцел
Read More

Saturday, December 12, 2009

// // Leave a Comment

How to merge/append/join wav segments/files into one?

Appending two or a few Wav files is easy with sound editors such as Audacity, Cool Edit and SoundForge. However, what if you need to join hundreds of files in different directories? Doing this manually is insane...

Recently I needed to do this with a bunch of records in Italian I wanted to put in my mp3-player. I found only a commercial solution, but I decided to code mine.

Todor's WaveAppender 0.01


Platform:Windows.License: Freeware.Warranty: No.

Download:Wave Appender 0.01


Please, post a comment if you find it useful.


Manual 

- Unzip files.
- Open scan.bat and edit the second string to point the path to the base folder with Wav files. E.g.:

scan.exe l:\italian\wave\1\ >list.txt

scan.exe your_full_path_here >list.txt

- Run scan.bat - it generates list.txt.
- Open list.txt and put on top a line pointing to the target directory. The merged files will be created there, e.g.:

l:\wav

l:\italian\wave\0\1b.wav
l:\italian\wave\0\1i.wav
l:\italian\wave\0\2b.wav
l:\italian\wave\0\2i.wav
l:\italian\wave\0\3b.wav
l:\italian\wave\0\3i.wav
l:\italian\wave\0\4b.wav
l:\italian\wave\0\4i.wav
l:\italian\wave\0\5b.wav
l:\italian\wave\0\5i.wav

#
$


- Run append.bat
- Voila! Files from each folder will be merged in 1.wav (first folder in the list), 2.wav, ... N.wav.


Using only appWav.exe

You can edit the list file manually, then you don't need to run the scanner.
The syntax is:

First line - target path
Next - N lists of path to files to be merged in N.wav. A list ends with "#".
The file ends with "$".

Eg.:

l:\wav

l:\italian\wave\0\1b.wav
l:\italian\wave\0\1i.wav
l:\italian\wave\0\2b.wav
l:\italian\wave\0\2i.wav
l:\italian\wave\0\3b.wav
l:\italian\wave\0\3i.wav
l:\italian\wave\0\4b.wav
l:\italian\wave\0\4i.wav
l:\italian\wave\0\5b.wav
l:\italian\wave\0\5i.wav

#
l:\italian\wave\2\1b.wav
l:\italian\wave\2\1i.wav
l:\italian\wave\2\2b.wav
l:\italian\wave\2\2i.wav
l:\italian\wave\2\3b.wav
l:\italian\wave\2\3i.wav
l:\italian\wave\2\4b.wav
l:\italian\wave\2\4i.wav
l:\italian\wave\2\5b.wav
l:\italian\wave\2\5i.wav
l:\italian\wave\2\6b.wav
l:\italian\wave\2\6i.wav
l:\italian\wave\2\7b.wav
l:\italian\wave\2\7i.wav
l:\italian\wave\2\8b.wav
l:\italian\wave\2\8i.wav
l:\italian\wave\2\9b.wav
l:\italian\wave\2\9i.wav
l:\italian\wave\2\10b.wav
l:\italian\wave\2\10i.wav

#
$

Notes:

- Files in each merge group should have the same format, code is pretty simple yet.
- Files in one list can be from different folders.


Thanks

Thanks to Srinivas Varukala (basic code for scanning directories in C#) and Vasian Cepa (Numeric Sorter in C#) for the Scanner part; you can find their code in CodeProject.

Appender code is in C++, written by me.


Keywords: How to merge wav files? How to append wav files. How to join wav files. Merging wav files.

Read More
// // Leave a Comment

Сборник с разкази и стихове с участието на Тош | A book with Todor's co-autorship



Last month was issued a compilation with prose and poetry, where Todor participates with two short stories.

"Три години БГлог", "3 години Бглог", "Авторът си ти"

Read More

Wednesday, December 9, 2009

// // Leave a Comment

Шофьорът на Москвич 2 - Тодор Арнаудов и Ангел Янев | The Moskvich Driver 2

Филм на Тош




Продължение на "Шофьорът на Москвич", който беше донякъде филмово начало на Twenkid Studio през 2008 г. и беше "ням", не го озвучих. Този път с Ангел, с говор, сочен звук и дори малко музика от мен.

"Шофьорът на Москвич 2" стана най-сетне и дебютът на Ангел. :) Има много хляб в него като комик.

Шофьорът на Москвич





Други ключови думи: москвич, 1500, АЗЛК, комедия, късометражни, филми, 408, 407, копач, джуган, таратайка, соц., комиците
Read More

Friday, December 4, 2009

// // Leave a Comment

DARPA PAL, CALO, RADAR - Cognitive Assistants that Learn and Organize


Other ambitious AGI projects, and these ones belong to DARPA. Scary!

I have a project for a similar tool that I call "Research Accelerator" or "Cognitive Accelerator", that initially would be an integration of various NLP, Machine Learning and Computer Vision techniques which assist and speed up in searching, reading, information extraction and any cognitive taks. This system also would be capable to work with GUI on its own, controlling the mouse and keyboard to do some job instead of user.

Time is ticking away and I need partners...



PAL - Personalized Assistant that Learns

RADAR - Reflected Agents with Distributed Adaptive Reasoning
CALO - Cognitive Assistant that Learns and Organizes
Read More

Monday, November 30, 2009

// // Leave a Comment

How to make VirtualDub to append videos encoded at different frame rates?


It's very annoying, isn't it?

In my case, I had 15 fps video, recorded when I had tiny 1GB memory card. Up to now when I found the solution, it was impossible to append them with video shot at 30 fps (All with my sweet Canon Powershot A540, mjpeg 640x480x30fps at about 15 Mbit/s).

VirtualDub of course can convert the framerate to 30 or whatevever. This is the first step:

Video -> Framerate


Also, in order to append to the native AVI, you should use the same compression scheme like in the file you want to append to. In my case - MJPEG.

It's a bit hard to find - MJPEG is in ffdshow section. I suggest you to use high setting to the JPEG like 90 or more to minimize quality losses. (Lossless jpg is best, but different compression.)

Video -> Compression




However, this is still not enough...

When you try to append the resulted 30 fps to a "native" 30 fps produced by the camera, a non-sense error message appears.


It's a rounding error, actually both values are equal to 30.


Solution

Actually, these numbers are values in the AVI headers of the files.
Find the position of these numbers in the files and make them equal.


For Canon A540 and probably the other Powershots it is best to set the values to the "native" values. For other cameras the exact values are probably different.


I located the position there::

0x80: 35 82 00 00

0x84: 40 42 0F 00



You can use a hexeditor, e.g.: XVI32



If you're not a hacker, look on the down-left, this is the position in hexadecimal (80 == 128 in decimal). Put on that places the "magic numbers" (for Canon A540).

And now edit your 15 fps records with the 30 fps ones! :)

PS. Of course it could/should be automated, the easiest way by telling Avery to fix it... ;)


Other keywords: Tricks, Hacks, Solutions, Tricky, Videos running at different framerates, append videos, concatenate videos
Read More

Saturday, November 21, 2009

// // Leave a Comment

Фантазьори и авантюристи правят великите открития | Dreamers and Аdventurers Make the Great Discoveries (An interview with Todor)


Todor Arnaudov: I'll create a thinking machine that will self-improve.


Dreamers and adventurers make the great discoveries. The sceptics' job is to deny their visions, and eventually not to believe their eyes.

An interview I gave for "Obekti" magazine about Artificial General Intelligence and the research I do in this direction.


Read the Interview in English

Тодор Арнаудов: Ще създам мислеща машина, която ще се самоусложнява*

Фантазьори и авантюристи правят великите открития. Работата на скептиците е да отричат, а след това да гледат и да не вярват на собствените си очи

Прочети интервюто на български

* моето предложение за заглавие беше "самоусъвършенства", но "самоусложнява" също е вярно и е по-просто за обективно измерване






Четете в брой 5, ноември/декември на списание "Обекти"!

Keywords: Artificial General Intelligence, Cognitive Computing, Thinking Machines, Seed Intelligence, Bottom-top approach, Self-improving AGI, AI, Artificial intelligence, Researchers in AG, Todor Arnaudov, Изкуствен интелект, универсален изкуствен интелект, мислещи машини, изкуствен разум


* Бях съкратил подзаглавието тук на "а после да не вярват на собствените си очи"
Read More

Sunday, November 15, 2009

// // Leave a Comment

Solid Optimizer Project (SolidOpt)

Това е проект на колеги от ФМИ на ПУ, Александър Пенев и Васил Василев и както те се изразяват представлява инструментариум за автоматизирано оптимизиране на софтуерни приложения. Тази седмица двамата имаха интересна презентация във ФМИ.

Накратко, системата цели да оптимизира код написан за момента .NET (евентуално на друг език с виртуална машина), като се опитва да го декомпилира в известна степен и след това да го опрости. Например - замяна на променливи с константи, съкращаване на дълги функции, за да могат да се вкарат като "inline" и мн. др.

Проектът звучи много обещаващо, а Сашо и Васил са пълни с идеи. Търсят се и други ентусиасти, които да се включат в разработката.

Read More

Sunday, November 1, 2009

// // Leave a Comment

Operant conditioning, Reward pathway, Reinforcement learning - Beginners directions to Artificial General Intelligence, Part 2

На български - втора част от Въведението в Силния ИИ/Универсалния ИИ.

Условни рефлекси, Оперантно кондициониране, обучение с подкрепление, допамин, пристрастяващо поведение и др. - Насоки за начинаещи в Универсалния изкуствен интелект. Психология, адаптивни системи, философия, икономика. Очаквайте скоро.
...

Part I - References to important researchers in Artificial General Intelligence

Part 2 - Classical conditioning, Operant conditioning, Reward pathway, Reinforcement learning

Introduction

In this article I'll emphasize several important concepts in Psychology, Human and animal behaviour, Adaptive systems and Learning. It has also something to do with Utilitarism in philosophy and economy.

1. Conditioning and Operant conditioning


Conditioning is related to the experiment of I. Pavlov with his famous dog's conditional reflex. Operant conditioning, formulated by Skinner in his Behaviorism goes much further with the inclusion of predictive conditioning that I would say, implies will and goal-driven behaviour. Rats or pigeons learn to press a lever, when they notice that after this action they receive a reward - food or even direct electric stimulation of a pleasure center in the brain.
Reinforcement - in operant conditioning, reinforcement occurs when an event following a response causes an increase in the probability of that response occurring in the future.
(Wikipedia)
I.e. when the rat gets food after pressing the lever, it's more likely to press it again. If it presses it many times, expecting food, but not receiving any, this behaviour is going to be inhibited and forgotten. The rat would adapt. First, it adapts to the case that pressing the lever is getting him reward, then it readapts that this behaviour is not rewarding anymore, and it's better to seek or focus on another one.

2. Reward pathway

Reward pathway is a mechanism in the brain, linked with learning, repetitive and goal-driven behaviours. It has something to do with dopamine neurotransmitter.

Addictive, repetitive and goal-driven behaviours are often related to affection of this mechanism, either by taking drugs or generating dopamine and other "natural drugs" by the brain, when you put yourself in particular behavioural patterns.

3. Love and post-traumatic disorders in terms of conditioning

For example, love is an addiction to an operant conditioned stimulus, that lover finds a source of very big rewards: sex, care, emotional support, fun, responsiveness to any of his needs etc.

Strongly conditioned stimulus are not only wanted, but expected to happen - being reinfoced many times, and giving very big rewards. This is the reason of the tragedy when the other lover lets you down or brakes up suddenly - she is causing a shocking and undesirable change in the expected rewarding pattern.

Post-traumatic stress disorders are also related to conditioning. When somebody suffers a painful experience, especially in young age, the brain may slip into wrong directions of making connections (conditioning) between many stimulus and the bad feelings of the traumatic situation. Every time when the sufferer is in a situation with even tiny similarities, the brain may start making wrong predictions, expecting undesirable outcomes like in the traumatic situation; all these resulting in fear, pain and a behaviour of avoiding such conditions.

4. High Level

At high level these concepts are related to the intelligent systems' principle of predicting future stimuli through extrapolation/projection/simulation of the past stimuli (experiences).

Intelligence is also a mechanism that aims at maximizing the probabilities of desirable/wanted stimuli and minimizing the probabilities of unwanted ones. Concepts of will and goal-driven behaviour take part at this point.

5. Self-control and long term goals vs short term ones

It worths thinking of these concepts also when considering your own behaviour and changing it. For example when thinking of longer term goals, instead of shorter term ones. The shorter term goals may give you immediate rewarding response, thus throwing you to local maximum" of pleasure and preventing you to find a higher local maximum or even the "global maximum". The global maximum could be reached after passing through some "minimums" - unrewarding activities in short term - which a shorter term reward strategy may not accept.


...To be continued...


Read More

Sunday, October 25, 2009

// // Leave a Comment

Сватбата - втори трейлър на комедията





Очаквайте скоро целия филм!

Синопсис: Млад репортер отива да заснеме репортаж от масовата сватба на Сектата на ФМИ. Всичко се преобръща, когато разбира, че присъствайки, той също трябва да бъде оженен. Няма измъкване и не се знае за коя точно ще го оженят. Историята обаче не свършва дотук...

В ролите: Тодор Арнаудов, Костадинка Делева, Никола Вълчанов, Иванка Николова и др.
Сценарист, режисьор, оператор, монтаж, звук, музика - Тодор Арнаудов.

Twenkid Studio:

http://twenkid.com
http://twenkid.blogspot.com


Първи трейлър



Read More