Ultrasonic irradiation of liquids, such as water− alcohol solutions, results in cavitation or the formation of small bubbles. Cavitation bubbles are generated in real solutions without the use of optical traps making our system as close to real conditions as possible. Under the action of the ultrasound, bubbles can grow, oscillate, and eventually collapse or decompose. We apply the mathematical method of separation of motions to interpret the acoustic effect on the bubbles. While in most situations, the spherical shape of a bubble is the most energetically profitable as it minimizes the surface energy, when the acoustic frequency is in resonance with the natural frequency of the bubble, shapes with the dihedral symmetry emerge. Some of these resonance shapes turn unstable, so the bubble decomposes. It turns out that bubbles in the solutions of different concentrations (with different surface energies and densities) attain different evolution paths. While it is difficult to obtain a deterministic description of how the solution concentration affects bubble dynamics, it is possible to separate images with different concentrations by applying the artificial neural network (ANN) algorithm. An ANN was trained to detect the concentration of alcohol in a water solution based on the bubble images. This indicates that artificial intelligence (AI) methods can complement deterministic analysis in nonequilibrium, near-unstable situations.