Part 1: Freud the Swift ML Library
Part 2: Core ML, Shazam for Images
Pt. 1: Freud the Swift ML Library
Freud is a Swift (3) machine-learning library dedicated to Sigmund Freud. This Library is implemented under the ‘Ego’ philosophy.
The ego attempts to mediate between id and reality.
Swift has been my favorite programming language of all time since the day Apple released it and playing with Swift is my daily joy. Last year when I was browsing GitHub I came across this project Swift AI by Collin Hundley and decided to try it out because everyone is crazy about it. Later I found out that Swift AI is in Swift 2.2 and by then Swift 3 had been out for months already. I could not compile it of course.
Everyone knows Xcode was not good at converting Swift 2 to Swift 3. Given that Xcode converting and minor modifications on the code would not work at all, I decided to rewrite the Swift AI project in Swift 3, and that’s why Freud is here.
And I know Swift 4 is out here now so I’m now doing some converting work.
Continue reading “Machine Learning in iOS”
In 2015 Apple introduced 3D Touch. Before that there was already Force Touch on Apple Watch and MacBook Pro. Although both “touch” are techniques that make the touchscreen force-sensitive, 3D Touch on iPhone 6s / 7 are in a way of a higher dimension. 3D Touch is sensitive to continuous force changes, while Force Touch is discrete. With 3D Touch coming with new iOS devices,
UIKit evolved too. A new way of interaction was introduced, which we’re going to talk about, that is, Peek and Pop. Let’s see how Apple defined Peek and Pop in its official guidelines:
Peek and Pop let your users preview all kinds of content and even act on it — without having to actually open it. Users can then press a little deeper to Pop into content in your app.More specifically:You can now enable the view controllers in your app (instances of the UIViewController class) to respond to user presses of various intensities. As the user presses more deeply, interaction proceeds through three phases:
- Indication that content preview is available
- Display of the preview—known as a peek—with options to act on it directly—known as peek quick actions
- Optional navigation to the view shown in the preview—known as a pop
Continue reading “Logic of Peek and Pop in 3D Touch”
A MineSweeper Game built with Qt
Build & Run
- Qt 5.7 or later
- C++ 11
- macOS Sierra (Build Target is currently macOS and if you want to run it on Windows or Linux, just modify the .pro file a little bit)
Continue reading “Daedalus, a MineSweeper Game Built with Qt”
A Klotski game with a powerful searching AI built in, completely implemented in Swift.
Klotski (华容道 in Chinese), is a sliding block puzzle with special
layouts of 10 different blocks and the aim of Klotski is to move a specific block, aka,
CaoCao, to some predefined location.
We built Swifty-Klotski in which an AI can automatically search for
feasible solutions to a layout.
Interpreting the Puzzle in Math
Mapping Layouts to a Coordinate System
Klotski has a 4×5 board with 10 different blocks at different positions. We mapped the board to a simple coordinate system, making it easy to represent different layouts using xAxis and yAxis values.
Continue reading “Swifty-Klotski, an iOS Game with an AI Built in”
Continue reading “一种孤独（零）”
Users who have LIKED this post:
暑假的学习主要集中在新语言、iOS SDK 的学习、已有项目的阅读
- Swift 3.0
- 「微北洋」 ／「 问津」 源代码
- 3rd-Party Repositories on GitHub
Swift, an Open Source Language
Swift 是 Apple 为了取代 Objective-C 而开发的语言，不同于 Objective-C，Swift 是完全开源的，目前可以在 OS X 和 Linux 内核操作系统中编译与运行。「微北洋」与「问津」目前都在逐渐转向 Swift 开发。Swift 实战演练将是我们暑假学习计划的核心。
Continue reading “iOS 组暑假学习计划”