Program Synthesis – A path to AGI?

Source: https://9to5google.com/2019/03/18/deepmind-agi-control/

Lets talk about Artificial General Intelligence or AGI. AGI is the idea that a computer system can be created that can solve almost all types of problems using general intelligence. General intelligence could be described to being similar to the type of intelligence that a human being uses to solve problems everyday. Humans all have very similar brains and anatomy, yet they can specialize to work in very different fields and also maintain the ability to do common tasks such as drive cars or operate a microwave. This general intelligence humans use on a day to day basis is taken for granted as not really being a big deal, but in the world of Artificial Intelligence, this is a very big deal.

If AGI can be created to match even average human intelligence, the world is going to change at an exponential rate. “Why is that?” , you say. Well think about it this way, if an AGI instance can be created on the fly, then thousands or millions of AGI instances can be created on the fly. If you need one thousand worker robots that all work on different tasks, no problem, just load up the code and press enter. If you need a million man robot army just press enter. If you need an autonomous factory, full of workers, managers and research scientists, just press enter. You say…”I don’t think it would be that easy”, well which part? You might think that designing a factory and filling it with specialized machines and workers and figuring out legal and contractual issues might be something that would have to be dealt with prior to such an enterprise, but I beg to differ. General intelligence can solve all of these problems and more. In fact sufficient general intelligence can solve all problems that have every been solved by humanity so far. Once this ability to solve all sorts of problems is ‘canned’ in an easily reproducible system, all the rules of our previous society are out the window.

Now that we have sort of outlined how big of a deal this is, lets talk about how something like this might happen. There are many different approaches people have taken in the past to try and produce AGI. I think one of the most promising paths to a potential AGI is something called Program Synthesis. This is basically the idea that a computer generates programs to solve problems. Programming is a very complicated task and requires knowledge of a programming languages syntax as well as programming techniques to accomplish certain types of tasks. All the skills required to provide meaningful programming solutions to problems mean that creating the program — that can program, is not a trivial task. In fact, it is extremely hard. That being said, recently a company called Deep Mind has been working on program synthesis in a project called ‘AlphaCode’. According to this article, they have managed to produce results that match up to an average computer programmer. In other words, Deep Mind has started competing in online coding competitions with their AlphaCode system and have recently ranked in the 54% percentile.

With extremely impressive results like these, it appears we are much closer to actually having a way to program without having to actually program. This means we can soon generate code much faster and with much less money and education. It is my opinion that the most creative people in our world, do not actually know how to code. If program synthesis becomes available to everyone, people with no experience coding, may be able to creatively solve our biggest problems. These people may even be able to create new ways of solving problems, such as the creation of AGI. With tools like program synthesis apparently knocking at the door, it appears the door to hyperspace might just have cracked open.

Chips and Apples

Welcome to the future

Source: https://i2.wp.com/9to5mac.com/wp-content/uploads/sites/6/2021/10/Apple-M1-Max.jpg?w=1500&quality=82&strip=all&ssl=1

The picture above is a thing of beauty. This is what is called a System on a Chip or SoC. This chip has been created to power the newest line of flagship laptops from Apple Computers. This chip is called the M1 Max and is based on technology that apple has used in their cell phones since the early 2000’s.

The chip architecture that powers Apple’s iPhones is different from what traditionally powered our laptops and desktop computers. This architecture is called Reduced Instruction Set Computer or RISC. This architecture is designed on the philosophy that instead of having very complicated specialized hardware that responds to specialized instructions, you design a processor to only have a few functions. This has a few major effects.

First, lets talk about hardware. A typical computer central processing unit uses a Complex Instruction Set Computer architecture or CISC. For specific problems a CISC might have special hardware built its chip that allows that specific type of computation to happen very quickly. This sounds great except, these extra functions and hardware may not ever even be used. This means there may be large areas of the chip’s footprint that are wasted on specialized hardware that is designed to be used only by a complex instruction set. If the same footprint is used to create a RISC style chip, more of that footprint can be used to create functional hardware that is used all the time. So if we have a transistor budget of say 10 billion transistors, we can more effectively use those 10 billion transistors for general purpose computing if we use a RISC style chip. Now it might be more clear why these types of chips would be used as a cell phones CPU.

Secondly, lets talk about heat. Since a RISC chip requires less transistors to fulfill all the same functionality of a CISC chip. RISC chips can actually have a much lower transistor count and still perform similar on general computation tasks. With a RISC chip’s potential lower transistor count we can reduce the amount of heat generated and power consumed when compared to CISC chips. This is another huge advantage to devices where heat and power consumption are major factors.

Up until recently RISC chips were seen to be the efficient alternatives to CISC chips and were seen as special use case. CISC chips were seen as the real power houses the could be used for gaming and serious computation tasks. While CISC chips ruled the world, Apple continued to develop the chips for the iPhone one generation at a time, until they became so fast and so efficient they began to actually compete with desktop grade CISC chips in performance and absolutely crush them in efficiency. Their performance and efficiency became so good, that eventually Apple decided to create a laptop line of computers that no longer use CISC chips but instead their own in house designed RISC chips that are based on their latest iPhone and iPad chips. Check out this graph, pretty amazing right?

Apple-vs-Intel-chips-performance | Gadgets News
Source: https://gadgets-news.ru/analiz-m1-i-testirovanie-bionic-a14/apple-vs-intel-chips-performance/

This leads me back to the M1 Max whose picture is featured at the top of the page. Apple managed to take their cell phone RISC chips and upscale them to power a full fledge laptop. Not only did they manage to power it, but they managed to beat almost everyone in performance and efficiency at the same time. This would be like having a extremely high performance car that also gets much better gas mileage than everyone else. They managed to create the 11th fastest single thread performing CPU ever, all while using a fraction of the power.

Source: https://www.cpubenchmark.net/singleThread.html

Now check out the power usage difference:

Source: https://nanoreview.net/en/cpu-compare/intel-core-i9-12900kf-vs-apple-m1-max

Since traditional CPU’s in computers are separated from memory, there is latency and bandwidth problems that arise from the longer distance, and dependence on 3rd party hardware to facilitate communication.( motherboard buses) This is also true when dealing with discrete GPU’s. Hardware vendors have worked around this issue by putting memory directly on discrete GPU’s, thus improving bandwidth and noise issues.

Now Apple on the other hand has instead opted to put everything on one chip, this is called a SoC or system on a chip. This allows for very high bandwidth between memory and CPU, GPU, NPU(Neural Processing Unit) and a host of other hardware devices like specialized video encoders. You may say…. ‘so what’, well here is why that is awesome. The M1 line of chips has what is called ‘Unified Memory’, meaning the CPU and GPU and all other processors on the SoC have direct access to the same memory. This is a huge step forward for computing because, instead of having separate memory for CPU and GPU now they can share the same resources and have extremely high bandwidth memory access. This is also a break through because an optional 64 Gigabytes of memory is available! At first you may say ‘so what’ again, but keep this in mind, the memory on a graphics card is the main limitation for what types of models and datasets can be handled during machine learning. The more memory the better. An extremely expensive RTX 3090 desktop grade discrete GPU from Nvidia only has 24 Gb of memory, meaning a small compact Mac Book Pro can train using a larger dataset than a specialized graphics card, a lot larger!

In conclusion, I am obviously pumped up about the breakthroughs Apples chip development teams have produced. The bar has been raised so much higher in so many dimensions of performance that other chip manufactures are being forced to take notice or RISC 😉 becoming a historical footnote.

Here is a cool paper on RISC vs. CISC that also mentions how much cheaper RISC chips are to design and produce due to their simplicity.

https://ijcat.com/archives/volume5/issue7/ijcatr05071015.pdf

Thanks for tuning into another episode of … Computer Talk.

Don’t forget to rate, subscribe and hit that bell. (Sorry couldn’t resist)

Balloons and Plans

This week, our team has been really plowing through our planning phase. When working with a sponsor it can be difficult sometimes to know exactly what they expect and how involved in the process they want to be. It can also be difficult to form a clear consensus about what parts of the plan to execute when there are multiple options on the table.

All that being said, so far the process of planning has been somewhat fruitful. We have an idea of what we want to do, and how we want to do it. There are still some unresolved questions about what code base we should use for specific tasks, which I hope we can get resolved soon.

Figuring out how to predict future stock prices is basically what our project is designed to do. Money has a special power over people. When people see money, or they imagine lots of money, or they see other people with more money than themselves, they generally react very strongly. Money is the air that fills the balloon of the human ego. The more of it we have, the smarter and more deserving we consider ourselves to be. Its very interesting to observe a humans behavior as their stock prices change. When their stocks go up, they become vocal and boisterous, their intelligence increases 30% and they will be glad to tell you how to make a lot of money in the stock market. The balloon fills with air. On the other hand when their stock prices go down, all hope is lost. Their shoulders droop, their mouth shuts and they become despondent.

Yes, it is true, the power of money over the human mind can not be exaggerated. Money represents the imaginary fulfilment of all hopes and desires. People say to themselves, ‘If I only had enough money to do X, things would be different’ . Other people that do have money generally have already satisfied whatever they thought that X was. But usually it turns out that X didn’t provide satisfaction for very long.

My point is, when tasked with creating software that basically tells you how to make money, all is fine and well until ….it starts to work. As soon as the money starts flowing and the word gets out, what used to be a quit library of study and solitude turns into a carnival of fear, greed, pride, jealousy and yes… lots of balloons. The juxtaposition of developing code in intellectual environment and being in the grips of an emotional roller coaster is quit a contrast. In the end, money is a tool that helps us achieve things in life, but its power over us must be understood and respected.

The Stock Market and Computers

The relationship between computers and the stock market is a deep relationship. According to https://www.investopedia.com 70 – 80% of trades on the stock market are made by automated systems. This means that most trades that happen are made from computers being triggered to buy or sell. This is just the automated trades, I would imagine every individual or money manager is also using a computer to manually decide when to submit a trade.

With the recent developments in machine learning and deep learning using neural networks, the possibilities for stock selection and buy/sell triggers using a trained network have greatly increased. Training a network to identify stocks or funds that are most likely to return the highest yield is very tempting. One idea would be to take historical data of stocks that showed great returns and use that stocks data just prior to its rise to train a network to identify such stocks that are currently about to rise. If we treat each stock that rose in price as type of signature and train our model to identify such signatures, maybe we can identify stocks that have greater potential to rise in the near future.

The idea of creating an automated process to generate money from the stock market is very alluring and challenging at the same time. I think it is easy to think that using mathematics and statistics to try and create some sort of logical framework will prevent us from losing money if things go bad. I think being very cautious about taking unnecessary risk is a good way to prevent money loss, but also is a good way to prevent gains. My personal philosophy is instead of trying to constantly make good decisions and average out the bad decisions, invest all ones time and effort into make three or less good decisions for a duration of a few years. Spend most of your time isolating a good idea from bad ones and then trust your work and put a lot of funds behind that idea.

I think when people use algorithms and computers to create a buffer between themselves and the real danger of losing money, we create a false sense of security. The power money has over the mind can not be exaggerated. We should acknowledge this and instead of trying to create a sense of security for ourselves using computers, we should instead understand that people are the ones pulling the levers behind the scenes. Computers don’t actually care about anything, it’s the emotions of the humans that own those computers and algorithms that determine what really happens and also …. when it happens. With this is all taken into account, we should make as few decisions as possible and focus all of our discipline and research into those decisions. The best way to make money in the stock market is to make a good decision of what to buy, buy it, then leave it alone until your goal is met. This may take a few months, years or even decades. Making money in the stock market is about buying the correct thing, then having the discipline to not let emotional swings affect the execution of a plan.

A great thing to do is to make a contract with yourself about what you are buying and what price you are going to sell it at. Sign this contract, and then go do something else for a few years and let the good decisions you have already made bring you wealth.

Robots and Computers

Raspberry Pi 4

For my first post I would like to talk about two of my favorite topics: Robots and Computers.

Robots and Computers go together like Peanut Butter and Jelly. For me the future seems to be a constantly evolving mixture of the two. The precision and speed digital computers can offer in such a small package and at such a low cost energetically and financially has allowed almost anyone with the will to get involved in computing. Robotics on the other hand seems less wide spread but ripe for future growth.

Personally I am very interested in what robotics can offer to humanity in terms of increasing everyone’s quality of life. As more and more industries turn to robotics to automate tasks, many people are worried that their jobs will be replaced. The truth is, their jobs will be replaced, but I don’t see this as a bad thing. The more jobs that are replaced means products can be manufactured and sold at cheaper prices and at a higher standard of quality. Eventually ( I hope) many products will become cheap enough that it just doesn’t require a lot of money to have a high standard of living.

If you ask what a robot really is, it’s really just a bunch of machinery being controlled by a computer. Robots are so cool to me because they can be built for almost any purpose and when combined with things like machine learning and the internet, the possibilities are almost limitless. Eventually I think we will have AI powered friends and robots throughout or societies. This will put immense pressure on our social and political hierarchies, but will have the potential to lift almost everyone out of poverty and maybe even change the way we treat one another.

For the reasons written about above and many more I haven’t mentioned, I think robotics and computers will take humanity further than any technology that has come before. Personally I want to work in this field and this is one reason I have pursued a Computer Science degree. I am excited to work on this semesters project whatever it may be and I am excited for my career that follows graduation of this program.